webpack: disable performance hints

This commit is contained in:
Shuanglei Tao
2018-05-03 00:12:04 +08:00
parent d4566b38e4
commit 9bc52a6123
5 changed files with 19 additions and 16 deletions

View File

@@ -7,7 +7,7 @@
<link inline rel="icon" type="image/png" href="favicon.png">
</head>
<body>
<div id="terminal-container"></div>
<div id="terminal-container"></div>
<div class="modal" id="modal">
<div class="modal-background"></div>
<div class="modal-content">
@@ -40,6 +40,6 @@
</div>
</div>
</div>
<script src="auth_token.js"></script>
<script src="auth_token.js"></script>
</body>
</html>

View File

@@ -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',
})
]
],
performance : {
hints : false
},
}

View File

@@ -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));
}
},
}
});

View File

@@ -9,8 +9,8 @@ module.exports = merge(config, {
plugins: [
new HtmlWebpackPlugin({
inlineSource: '.(js|css)$',
template: 'index.html'
template: 'index.html',
}),
new HtmlWebpackInlineSourcePlugin()
new HtmlWebpackInlineSourcePlugin(),
]
});

4
src/index.html vendored

File diff suppressed because one or more lines are too long