mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +00:00
Webpack upgraded from 4 to 5 + dependancies updated
This commit is contained in:
parent
c8e7722fd1
commit
9937d3a060
7 changed files with 1634 additions and 2204 deletions
|
@ -2,64 +2,64 @@ const { merge } = require('webpack-merge');
|
|||
const webpack = require('webpack');
|
||||
const commonConfig = require('./common.js');
|
||||
|
||||
module.exports = function () {
|
||||
return merge(commonConfig(), {
|
||||
devtool: 'eval-source-map',
|
||||
output: {
|
||||
filename: '[name].dev.js',
|
||||
},
|
||||
mode: 'development',
|
||||
devServer: {
|
||||
hot: true,
|
||||
// enable HMR on the server
|
||||
contentBase: './web',
|
||||
// match the output path
|
||||
},
|
||||
plugins: [
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
],
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
enforce: 'pre',
|
||||
test: /\.js$/,
|
||||
loader: 'eslint-loader',
|
||||
exclude: /node_modules/,
|
||||
},
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /(node_modules)/,
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
presets: ['@babel/preset-env']
|
||||
},
|
||||
module.exports = merge(commonConfig, {
|
||||
devtool: 'eval-source-map',
|
||||
output: {
|
||||
filename: '[name].dev.js',
|
||||
},
|
||||
mode: 'development',
|
||||
devServer: {
|
||||
hot: true,
|
||||
// enable HMR on the server
|
||||
contentBase: './web',
|
||||
// match the output path
|
||||
},
|
||||
plugins: [
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
],
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
enforce: 'pre',
|
||||
test: /\.js$/,
|
||||
loader: 'eslint-loader',
|
||||
exclude: /node_modules/,
|
||||
},
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /(node_modules)/,
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
presets: ['@babel/preset-env'],
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /\.(s)?css$/,
|
||||
use: [
|
||||
'style-loader',
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
importLoaders: 1,
|
||||
},
|
||||
{
|
||||
test: /\.(s)?css$/,
|
||||
use: [
|
||||
'style-loader',
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
importLoaders: 1,
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: 'postcss-loader',
|
||||
options: {
|
||||
postcssOptions: {
|
||||
plugins: ['autoprefixer'],
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: 'postcss-loader',
|
||||
options: {
|
||||
plugins: [require('autoprefixer')({})],
|
||||
},
|
||||
},
|
||||
'sass-loader',
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.(jpg|png|gif|svg|ico|eot|ttf|woff|woff2)$/,
|
||||
use: 'url-loader',
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
};
|
||||
},
|
||||
'sass-loader',
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.(jpg|png|gif|svg|ico|eot|ttf|woff|woff2)$/,
|
||||
use: 'url-loader',
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue