mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-24 07:39:59 +08:00
@ -1,7 +1,6 @@
|
||||
const path = require('path');
|
||||
const dev = process.env.NODE_ENV !== 'production';
|
||||
|
||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
||||
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||
|
||||
const config = {
|
||||
@ -19,20 +18,6 @@ const config = {
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /(node_modules)/,
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
presets: [[
|
||||
'@babel/preset-env', {
|
||||
useBuiltIns: 'usage'
|
||||
}
|
||||
]]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.scss$/,
|
||||
use: [
|
||||
@ -44,15 +29,6 @@ const config = {
|
||||
loader: "css-loader", options: {
|
||||
sourceMap: dev
|
||||
}
|
||||
}, {
|
||||
loader: 'postcss-loader',
|
||||
options: {
|
||||
ident: 'postcss',
|
||||
sourceMap: dev,
|
||||
plugins: (loader) => [
|
||||
require('autoprefixer')(),
|
||||
]
|
||||
}
|
||||
}, {
|
||||
loader: "sass-loader", options: {
|
||||
sourceMap: dev
|
||||
@ -73,8 +49,4 @@ if (dev) {
|
||||
config['devtool'] = 'inline-source-map';
|
||||
}
|
||||
|
||||
if (!dev) {
|
||||
config.plugins.push(new UglifyJsPlugin());
|
||||
}
|
||||
|
||||
module.exports = config;
|
Reference in New Issue
Block a user