]>
BookStack Code Mirror - bookstack/blobdiff - webpack.config.js
projects
/
bookstack
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update common.php
[bookstack]
/
webpack.config.js
diff --git
a/webpack.config.js
b/webpack.config.js
index 5c0501e3ba627136916f1052e53f59e7bb30dc8a..78b679a0a82f51fab622fb35ff60c0dece578119 100644
(file)
--- a/
webpack.config.js
+++ b/
webpack.config.js
@@
-1,8
+1,7
@@
const path = require('path');
const dev = process.env.NODE_ENV !== 'production';
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',
const config = {
target: 'web',
@@
-19,48
+18,30
@@
const config = {
},
module: {
rules: [
},
module: {
rules: [
- {
- test: /\.js$/,
- exclude: /(node_modules)/,
- use: {
- loader: 'babel-loader',
- options: {
- presets: [[
- '@babel/preset-env', {
- useBuiltIns: 'usage'
- }
- ]]
- }
- }
- },
{
test: /\.scss$/,
{
test: /\.scss$/,
- use: ExtractTextPlugin.extract({
- fallback: "style-loader",
- use: [{
+ use: [
+ {
+ loader: MiniCssExtractPlugin.loader,
+ options: {}
+ },
+ {
loader: "css-loader", options: {
loader: "css-loader", options: {
- sourceMap: dev
- }
- }, {
- loader: 'postcss-loader',
- options: {
- ident: 'postcss',
- sourceMap: dev,
- plugins: (loader) => [
- require('autoprefixer')(),
- ]
- }
+ sourceMap: dev
+ }
}, {
loader: "sass-loader", options: {
sourceMap: dev
}
}, {
loader: "sass-loader", options: {
sourceMap: dev
}
- }
]
- })
+ }
+ ]
}
]
},
plugins: [
}
]
},
plugins: [
- new ExtractTextPlugin("[name].css"),
+ new MiniCssExtractPlugin({
+ filename: "[name].css",
+ }),
]
};
]
};
@@
-68,8
+49,4
@@
if (dev) {
config['devtool'] = 'inline-source-map';
}
config['devtool'] = 'inline-source-map';
}
-if (!dev) {
- config.plugins.push(new UglifyJsPlugin());
-}
-
module.exports = config;
\ No newline at end of file
module.exports = config;
\ No newline at end of file