mirror of
https://github.com/chinchang/web-maker.git
synced 2025-08-02 19:37:29 +02:00
remove html minification
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
"description": "A blazing fast & offline web playground",
|
"description": "A blazing fast & offline web playground",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "if-env NODE_ENV=production && npm run -s serve || npm run -s dev",
|
"start": "if-env NODE_ENV=production && npm run -s serve || npm run -s dev",
|
||||||
"build": "preact build",
|
"build": "preact build --template src/index.html --no-prerender",
|
||||||
"serve": "preact build && preact serve",
|
"serve": "preact build && preact serve",
|
||||||
"dev": "preact watch --template src/index.html --https --no-prerender",
|
"dev": "preact watch --template src/index.html --https --no-prerender",
|
||||||
"lint": "eslint src",
|
"lint": "eslint src",
|
||||||
|
@@ -13,6 +13,12 @@ export default function (config, env, helpers) {
|
|||||||
if (env.isProd) {
|
if (env.isProd) {
|
||||||
config.devtool = false; // disable sourcemaps
|
config.devtool = false; // disable sourcemaps
|
||||||
|
|
||||||
|
const htmlWebpackPlugin = helpers.getPluginsByName(config, 'HtmlWebpackPlugin')[0];
|
||||||
|
Object.assign(htmlWebpackPlugin.plugin.options.minify, {
|
||||||
|
removeComments: false,
|
||||||
|
collapseWhitespace: false
|
||||||
|
})
|
||||||
|
|
||||||
config.plugins.push(
|
config.plugins.push(
|
||||||
new CommonsChunkPlugin({
|
new CommonsChunkPlugin({
|
||||||
name: 'vendor',
|
name: 'vendor',
|
||||||
|
Reference in New Issue
Block a user