refactor: fix path and webpack

This commit is contained in:
tiddlygit-test 2020-12-21 12:11:14 +08:00
parent 1808972197
commit 92edc7b528
15 changed files with 1692 additions and 322 deletions

View file

@ -15,6 +15,10 @@ module.exports = [
// },
// },
// },
{
test: /\.css$/,
use: [{ loader: 'style-loader' }, { loader: 'css-loader' }],
},
{
test: /\.(t|j)sx?$/,
exclude: /(node_modules|\.webpack)/,
@ -37,4 +41,32 @@ module.exports = [
},
],
},
{
test: /\.(png|jpe?g|gif)$/,
use: [
{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'images/',
},
},
{
loader: 'image-webpack-loader',
options: {
query: {
mozjpeg: {
progressive: true,
},
gifsicle: {
interlaced: true,
},
optipng: {
optimizationLevel: 7,
},
},
},
},
],
},
];