mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-23 09:31:04 +00:00
c467bf9382
Replace deprecated babel-eslint with @babel/eslint-parser Replace deprecated eslint-loader with eslint-webpack-plugin Update other plugins, resolving several opened security reports. Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
61 lines
1.3 KiB
JavaScript
61 lines
1.3 KiB
JavaScript
const { merge } = require('webpack-merge');
|
|
const webpack = require('webpack');
|
|
const commonConfig = require('./common.js');
|
|
const ESLintPlugin = require('eslint-webpack-plugin');
|
|
|
|
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 ESLintPlugin(),
|
|
new webpack.HotModuleReplacementPlugin(),
|
|
],
|
|
module: {
|
|
rules: [
|
|
{
|
|
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,
|
|
},
|
|
},
|
|
{
|
|
loader: 'postcss-loader',
|
|
options: {
|
|
postcssOptions: {
|
|
plugins: ['autoprefixer'],
|
|
},
|
|
},
|
|
},
|
|
'sass-loader',
|
|
],
|
|
},
|
|
{
|
|
test: /\.(jpg|png|gif|svg|ico|eot|ttf|woff|woff2)$/,
|
|
use: 'url-loader',
|
|
},
|
|
],
|
|
},
|
|
});
|