mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-24 15:49:59 +08:00
Updated npm packages and migrated webpack css plugin
This commit is contained in:
@ -2,7 +2,7 @@ const path = require('path');
|
||||
const dev = process.env.NODE_ENV !== 'production';
|
||||
|
||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
||||
const ExtractTextPlugin = require("extract-text-webpack-plugin");
|
||||
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||
|
||||
const config = {
|
||||
target: 'web',
|
||||
@ -35,12 +35,15 @@ const config = {
|
||||
},
|
||||
{
|
||||
test: /\.scss$/,
|
||||
use: ExtractTextPlugin.extract({
|
||||
fallback: "style-loader",
|
||||
use: [{
|
||||
use: [
|
||||
{
|
||||
loader: MiniCssExtractPlugin.loader,
|
||||
options: {}
|
||||
},
|
||||
{
|
||||
loader: "css-loader", options: {
|
||||
sourceMap: dev
|
||||
}
|
||||
sourceMap: dev
|
||||
}
|
||||
}, {
|
||||
loader: 'postcss-loader',
|
||||
options: {
|
||||
@ -54,13 +57,15 @@ const config = {
|
||||
loader: "sass-loader", options: {
|
||||
sourceMap: dev
|
||||
}
|
||||
}]
|
||||
})
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new ExtractTextPlugin("[name].css"),
|
||||
new MiniCssExtractPlugin({
|
||||
filename: "[name].css",
|
||||
}),
|
||||
]
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user