Only build HTML for WDS, use our custom builder for actual builds
This commit is contained in:
@ -95,7 +95,7 @@
|
||||
"scripts": {
|
||||
"test": "jest",
|
||||
"tox": "sudo docker exec -it -u root iris_mopidy_1 bash -c \"cd /iris && tox\"",
|
||||
"start": "NODE_ENV=development webpack-dev-server",
|
||||
"start": "NODE_ENV=development WEBPACK_DEV_SERVER=1 webpack-dev-server",
|
||||
"lint": "eslint src",
|
||||
"lint:fix": "eslint src --fix",
|
||||
"build": "node build_tools/build.js",
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
const isDev = process.env.NODE_ENV !== 'production';
|
||||
const isDevServer = process.env.WEBPACK_DEV_SERVER;
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
@ -90,7 +91,7 @@ const config = {
|
||||
new MiniCssExtractPlugin({
|
||||
filename: `app${isDev ? '' : '.min'}.css`,
|
||||
}),
|
||||
new HtmlWebpackPlugin({ template: './src/index.html' }),
|
||||
...isDevServer ? [new HtmlWebpackPlugin({ template: './src/index.html' })] : [],
|
||||
],
|
||||
watchOptions: {
|
||||
poll: true,
|
||||
|
||||
Reference in New Issue
Block a user