mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
css hash
This commit is contained in:
parent
3f8e8292ad
commit
56f62950d2
1 changed files with 6 additions and 11 deletions
|
@ -14,11 +14,6 @@ const htmlPlugin = new HtmlWebPackPlugin({
|
||||||
// favicon: 'src/sprites/favicon.png',
|
// favicon: 'src/sprites/favicon.png',
|
||||||
});
|
});
|
||||||
|
|
||||||
const miniCssExractPlugin = new MiniCssExtractPlugin({
|
|
||||||
filename: '[name].css',
|
|
||||||
chunkFilename: '[id].css',
|
|
||||||
});
|
|
||||||
|
|
||||||
const isDevelopment = process.env.NODE_ENV !== 'production';
|
const isDevelopment = process.env.NODE_ENV !== 'production';
|
||||||
const devtool = isDevelopment ? 'cheap-module-eval-source-map' : 'source-map';
|
const devtool = isDevelopment ? 'cheap-module-eval-source-map' : 'source-map';
|
||||||
|
|
||||||
|
@ -36,12 +31,12 @@ module.exports = () => {
|
||||||
/* Export */
|
/* Export */
|
||||||
const plugins = [
|
const plugins = [
|
||||||
htmlPlugin,
|
htmlPlugin,
|
||||||
miniCssExractPlugin,
|
// miniCssExractPlugin,
|
||||||
new webpack.HashedModuleIdsPlugin(),
|
new webpack.HashedModuleIdsPlugin(),
|
||||||
new Dotenv(),
|
new Dotenv(),
|
||||||
new MiniCssExtractPlugin({
|
new MiniCssExtractPlugin({
|
||||||
filename: '[name].[contenthash].css',
|
filename: '[name].[contenthash].css',
|
||||||
chunkFilename: '[id].[hash].css',
|
chunkFilename: '[id].[contenthash].css',
|
||||||
}),
|
}),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -58,8 +53,8 @@ module.exports = () => {
|
||||||
{
|
{
|
||||||
test: /\.less$/,
|
test: /\.less$/,
|
||||||
use: [
|
use: [
|
||||||
// { loader: isDevelopment ? 'style-loader' : MiniCssExtractPlugin.loader },
|
{ loader: isDevelopment ? 'style-loader' : MiniCssExtractPlugin.loader },
|
||||||
{ loader: MiniCssExtractPlugin.loader },
|
// { loader: MiniCssExtractPlugin.loader },
|
||||||
// { loader: 'css-loader' },
|
// { loader: 'css-loader' },
|
||||||
{
|
{
|
||||||
loader: 'css-loader',
|
loader: 'css-loader',
|
||||||
|
@ -76,8 +71,8 @@ module.exports = () => {
|
||||||
{
|
{
|
||||||
test: /\.scss$/,
|
test: /\.scss$/,
|
||||||
use: [
|
use: [
|
||||||
// { loader: isDevelopment ? 'style-loader' : MiniCssExtractPlugin.loader },
|
{ loader: isDevelopment ? 'style-loader' : MiniCssExtractPlugin.loader },
|
||||||
{ loader: MiniCssExtractPlugin.loader, options: { filename: '[name].[hash].css' } },
|
// { loader: MiniCssExtractPlugin.loader, options: { filename: '[name].[hash].css' } },
|
||||||
{
|
{
|
||||||
loader: 'css-loader',
|
loader: 'css-loader',
|
||||||
options: {
|
options: {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue