From: Shuanglei Tao Date: Wed, 2 May 2018 16:12:04 +0000 (+0800) Subject: webpack: disable performance hints X-Git-Url: http://git.prime8.dev/?a=commitdiff_plain;h=9bc52a6123a349f3f1832c2dfa848fb8c02b9660;p=ttyd.git webpack: disable performance hints --- 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 @@ -
+
- +