mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-01-11 06:12:42 +05:30
Improve assets caching
This commit is contained in:
parent
364b7f3c80
commit
d25653dd7c
@ -47,7 +47,7 @@ const webpackConfig = {
|
|||||||
output: {
|
output: {
|
||||||
path: outputPath,
|
path: outputPath,
|
||||||
publicPath: '/',
|
publicPath: '/',
|
||||||
filename: '[name].js?[hash]',
|
filename: '[name].js?[chunkhash]',
|
||||||
},
|
},
|
||||||
|
|
||||||
resolve: {
|
resolve: {
|
||||||
@ -179,14 +179,14 @@ const webpackConfig = {
|
|||||||
test: /\.(png|gif|jpg|svg)$/,
|
test: /\.(png|gif|jpg|svg)$/,
|
||||||
loader: 'file-loader',
|
loader: 'file-loader',
|
||||||
query: {
|
query: {
|
||||||
name: 'assets/[name].[ext]?[hash]',
|
name: 'assets/[name].[ext]?[contenthash]',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.(woff|woff2|ttf)$/,
|
test: /\.(woff|woff2|ttf)$/,
|
||||||
loader: 'file-loader',
|
loader: 'file-loader',
|
||||||
query: {
|
query: {
|
||||||
name: 'assets/fonts/[name].[ext]?[hash]',
|
name: 'assets/fonts/[name].[ext]?[contenthash]',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -232,8 +232,7 @@ if (isProduction) {
|
|||||||
|
|
||||||
webpackConfig.plugins.push(
|
webpackConfig.plugins.push(
|
||||||
new MiniCssExtractPlugin({
|
new MiniCssExtractPlugin({
|
||||||
filename: '[name].css?[hash]',
|
filename: '[name].css?[contenthash]',
|
||||||
chunkFilename: '[id].css?[hash]',
|
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user