https://github.com/zirho/webpack-to-legacy
Refactor ES5 Javascript to ES6 code now with webpack
https://github.com/zirho/webpack-to-legacy
Last synced: about 1 year ago
JSON representation
Refactor ES5 Javascript to ES6 code now with webpack
- Host: GitHub
- URL: https://github.com/zirho/webpack-to-legacy
- Owner: zirho
- Created: 2016-08-14T21:16:12.000Z (almost 10 years ago)
- Default Branch: 2-use-external-package
- Last Pushed: 2016-08-15T05:34:15.000Z (almost 10 years ago)
- Last Synced: 2025-02-04T19:45:17.434Z (over 1 year ago)
- Language: CSS
- Homepage: http://zirho.github.io/2016/08/13/webpack-to-legacy/
- Size: 41 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# branches
* legacy code: https://github.com/zirho/webpack-to-legacy/tree/master
* refactored: https://github.com/zirho/webpack-to-legacy/tree/1-add-new-entry-file
* external package: https://github.com/zirho/webpack-to-legacy/tree/2-use-external-package
# Refactor legacy code today with webpack!
This repo is for [my blog post](http://zirho.github.io/2016/08/13/webpack-to-legacy/), showing how to refactor legacy js code with webpack.
What I want to demonstrate are...
* Refactoring this web app, currently using global scope functions.
* Making it use ES6 syntax, also use external npm packages.
* Using HMR(hot module replacement) with webpack
# How to setup this repository in local
### clone github repository in local folder
```
$ git clone https://github.com/zirho/webpack-to-legacy.git webpack-to-legacy
```
### install npm packages
```
$ npm i
```
### start webpack-dev-server
```
$ npm run dev
```
and navigate to see web app in another termial window or tab
```
$ open http://localhost:8080
```