From 9bc52a6123a349f3f1832c2dfa848fb8c02b9660 Mon Sep 17 00:00:00 2001 From: Shuanglei Tao Date: Thu, 3 May 2018 00:12:04 +0800 Subject: [PATCH] webpack: disable performance hints --- html/index.html | 4 ++-- html/webpack.config.js | 17 ++++++++++------- html/webpack.dev.js | 6 +++--- html/webpack.prod.js | 4 ++-- src/index.html | 4 ++-- 5 files changed, 19 insertions(+), 16 deletions(-) diff --git a/html/index.html b/html/index.html index 80adc69..b6a5c7b 100644 --- a/html/index.html +++ b/html/index.html @@ -7,7 +7,7 @@ -
+
- + diff --git a/html/webpack.config.js b/html/webpack.config.js index 0c2e0df..4ed9f53 100644 --- a/html/webpack.config.js +++ b/html/webpack.config.js @@ -6,7 +6,7 @@ module.exports = { entry: './js/app.js', output: { path: __dirname + '/dist', - filename: devMode ? '[name].js' : '[name].[hash].js' + filename: devMode ? '[name].js' : '[name].[hash].js', }, module: { rules: [ @@ -18,7 +18,7 @@ module.exports = { options: { presets: ['env'] } - } + }, }, { test: /\.s?[ac]ss$/, @@ -26,17 +26,20 @@ module.exports = { devMode ? 'style-loader' : MiniCssExtractPlugin.loader, 'css-loader', 'sass-loader', - ] - } + ], + }, ] }, plugins: [ new CopyWebpackPlugin([ - {from: 'favicon.png', to: '.' } + { from: 'favicon.png', to: '.' } ], {}), new MiniCssExtractPlugin({ filename: devMode ? '[name].css' : '[name].[hash].css', chunkFilename: devMode ? '[id].css' : '[id].[hash].css', }) - ] -} \ No newline at end of file + ], + performance : { + hints : false + }, +} diff --git a/html/webpack.dev.js b/html/webpack.dev.js index 6174f2a..59f79f1 100644 --- a/html/webpack.dev.js +++ b/html/webpack.dev.js @@ -10,8 +10,8 @@ module.exports = merge(config, { mode: 'development', plugins: [ new HtmlWebpackPlugin({ - template: 'index.html' - }) + template: 'index.html', + }), ], serve: { content: __dirname + '/dist', @@ -27,6 +27,6 @@ module.exports = merge(config, { } ); app.use(convert(ttydProxy)); - } + }, } }); diff --git a/html/webpack.prod.js b/html/webpack.prod.js index d1d01cd..42d36c4 100644 --- a/html/webpack.prod.js +++ b/html/webpack.prod.js @@ -9,8 +9,8 @@ module.exports = merge(config, { plugins: [ new HtmlWebpackPlugin({ inlineSource: '.(js|css)$', - template: 'index.html' + template: 'index.html', }), - new HtmlWebpackInlineSourcePlugin() + new HtmlWebpackInlineSourcePlugin(), ] }); diff --git a/src/index.html b/src/index.html index 6a3f6d1..ba27e62 100644 --- a/src/index.html +++ b/src/index.html @@ -7,7 +7,7 @@ -
+
- + -- 2.43.4