mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-30 04:51:01 +00:00
01609f8514
And run it: - `yarn eslint app/**/*.js --fix` - `yarn eslint web/**/*.js --fix`
58 lines
1.2 KiB
JavaScript
58 lines
1.2 KiB
JavaScript
const { merge } = require('webpack-merge');
|
|
const ESLintPlugin = require('eslint-webpack-plugin');
|
|
const commonConfig = require('./common');
|
|
|
|
module.exports = merge(commonConfig, {
|
|
devtool: 'eval-source-map',
|
|
output: {
|
|
filename: '[name].dev.js',
|
|
},
|
|
mode: 'development',
|
|
devServer: {
|
|
static: {
|
|
directory: './web',
|
|
},
|
|
},
|
|
plugins: [
|
|
new ESLintPlugin(),
|
|
],
|
|
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)$/,
|
|
type: 'asset/inline',
|
|
},
|
|
],
|
|
},
|
|
});
|