Enable hot module replacement(HMR) (#1100)

* Use ES6 in static/main.js

+ Lint static/main.js

* Enable hot module replacement(HMR) in webpack-dev-server

* Disable no-console in static/main.js

* Use seperate entry point/bundle for the test page(/static/main.js)
This commit is contained in:
ylemkimon
2018-02-02 03:33:49 +09:00
committed by Kevin Barabash
parent 603f12df8d
commit 30854eb866
5 changed files with 39 additions and 32 deletions

View File

@@ -3,10 +3,14 @@ const { targets, createConfig } = require('./webpack.common');
const path = require('path');
const PORT = 7936;
// only the `devServer` options for the first configuration will be taken
// into account and used for all the configurations in the array.
// dev minify
const katexConfig = createConfig(targets.shift(), true, false);
// add the entry point for test page
katexConfig.entry.main = './static/main.js';
// only the `devServer` options for the first configuration will be taken
// into account and used for all the configurations in the array.
katexConfig.devServer = {
contentBase: [path.join(__dirname, 'static'), __dirname],
// Allow server to be accessed from anywhere, which is useful for