2020-08-25 10:22:29 +00:00
|
|
|
const { merge } = require('webpack-merge');
|
2021-06-27 15:34:25 +00:00
|
|
|
const ESLintPlugin = require('eslint-webpack-plugin');
|
2022-01-05 20:37:45 +00:00
|
|
|
const commonConfig = require('./common');
|
2017-03-31 18:21:41 +00:00
|
|
|
|
2020-11-11 08:48:04 +00:00
|
|
|
module.exports = merge(commonConfig, {
|
|
|
|
devtool: 'eval-source-map',
|
|
|
|
output: {
|
|
|
|
filename: '[name].dev.js',
|
|
|
|
},
|
|
|
|
mode: 'development',
|
|
|
|
devServer: {
|
2022-01-05 15:40:08 +00:00
|
|
|
static: {
|
|
|
|
directory: './web',
|
|
|
|
},
|
2020-11-11 08:48:04 +00:00
|
|
|
},
|
|
|
|
plugins: [
|
2021-06-27 15:34:25 +00:00
|
|
|
new ESLintPlugin(),
|
2020-11-11 08:48:04 +00:00
|
|
|
],
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.js$/,
|
|
|
|
exclude: /(node_modules)/,
|
|
|
|
use: {
|
|
|
|
loader: 'babel-loader',
|
|
|
|
options: {
|
|
|
|
presets: ['@babel/preset-env'],
|
|
|
|
},
|
2017-03-31 18:21:41 +00:00
|
|
|
},
|
2020-11-11 08:48:04 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.(s)?css$/,
|
|
|
|
use: [
|
|
|
|
'style-loader',
|
|
|
|
{
|
|
|
|
loader: 'css-loader',
|
2017-03-31 18:21:41 +00:00
|
|
|
options: {
|
2020-11-11 08:48:04 +00:00
|
|
|
importLoaders: 1,
|
2017-06-20 05:14:04 +00:00
|
|
|
},
|
|
|
|
},
|
2020-11-11 08:48:04 +00:00
|
|
|
{
|
|
|
|
loader: 'postcss-loader',
|
|
|
|
options: {
|
|
|
|
postcssOptions: {
|
|
|
|
plugins: ['autoprefixer'],
|
2020-08-25 10:22:29 +00:00
|
|
|
},
|
|
|
|
},
|
2020-11-11 08:48:04 +00:00
|
|
|
},
|
|
|
|
'sass-loader',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.(jpg|png|gif|svg|ico|eot|ttf|woff|woff2)$/,
|
2022-01-05 20:37:45 +00:00
|
|
|
type: 'asset/inline',
|
2020-11-11 08:48:04 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
});
|