mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +00:00
Upgrade to NodeJS 12
Update javascript deps to latest version. Rebuild assets - Keep `stylehint` in a lower version because starting at v9.0.0 it generates too much errors. We might fix them later. - Don't touch `materialize-css` to avoid too much side effect. We might update it later (to 1.0.0).
This commit is contained in:
parent
092cab5695
commit
dce3c84c9c
20 changed files with 3824 additions and 3157 deletions
|
@ -1,35 +1,43 @@
|
|||
const webpack = require('webpack');
|
||||
const webpackMerge = require('webpack-merge');
|
||||
const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
const { merge } = require('webpack-merge');
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
const ManifestPlugin = require('webpack-manifest-plugin');
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
|
||||
const commonConfig = require('./common.js');
|
||||
|
||||
module.exports = function () {
|
||||
return webpackMerge(commonConfig(), {
|
||||
return merge(commonConfig(), {
|
||||
output: {
|
||||
filename: '[name].js',
|
||||
},
|
||||
mode: 'production',
|
||||
devtool: 'source-map',
|
||||
optimization: {
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
cache: true,
|
||||
parallel: true,
|
||||
sourceMap: true,
|
||||
terserOptions: {
|
||||
output: {
|
||||
comments: false,
|
||||
},
|
||||
},
|
||||
extractComments: false,
|
||||
}),
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': {
|
||||
'NODE_ENV': JSON.stringify('production'),
|
||||
},
|
||||
}),
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
beautify: false,
|
||||
mangle: {
|
||||
screw_ie8: true,
|
||||
keep_fnames: true,
|
||||
},
|
||||
compress: {
|
||||
screw_ie8: true,
|
||||
warnings: false,
|
||||
},
|
||||
comments: false,
|
||||
new MiniCssExtractPlugin({
|
||||
filename: '[name].css',
|
||||
chunkFilename: '[id].css',
|
||||
}),
|
||||
new ExtractTextPlugin('[name].css'),
|
||||
new ManifestPlugin({
|
||||
fileName: 'manifest.json',
|
||||
}),
|
||||
|
@ -48,32 +56,33 @@ module.exports = function () {
|
|||
use: {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
presets: ['env'],
|
||||
presets: ['@babel/preset-env']
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /\.(s)?css$/,
|
||||
use: ExtractTextPlugin.extract({
|
||||
fallback: 'style-loader',
|
||||
use: [
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
importLoaders: 1,
|
||||
minimize: {
|
||||
discardComments: {
|
||||
removeAll: true,
|
||||
},
|
||||
core: true,
|
||||
minifyFontValues: true,
|
||||
},
|
||||
},
|
||||
test: /\.(sa|sc|c)ss$/,
|
||||
use: [
|
||||
{
|
||||
loader: MiniCssExtractPlugin.loader,
|
||||
options: {
|
||||
hmr: process.env.NODE_ENV === 'development',
|
||||
},
|
||||
'postcss-loader',
|
||||
'sass-loader',
|
||||
],
|
||||
}),
|
||||
},
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
importLoaders: 1,
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: 'postcss-loader',
|
||||
options: {
|
||||
plugins: [require('autoprefixer')({})],
|
||||
},
|
||||
},
|
||||
'sass-loader',
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.(jpg|png|gif|svg|ico)$/,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue