-
before refactoring: https://github.com/zirho/webpack-to-legacy/tree/master
-
after refactoring: https://github.com/zirho/webpack-to-legacy/tree/1-add-new-entry-file
This repo is for my blog post, 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
$ git clone https://github.com/zirho/webpack-to-legacy.git webpack-to-legacy
$ npm i
$ npm run dev
and navigate to see web app in another termial window or tab
$ open http://localhost:8080