-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathwebpack.config.js
42 lines (36 loc) · 895 Bytes
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// @ts-check
const path = require('node:path');
/** @type import('webpack').Configuration */
const config = {
entry: './App.jsx',
output: {
path: path.resolve('build')
},
resolve: {
extensions: ['.js', '.jsx']
},
module: {
rules: [
{
test: /\.jsx?$/,
// [Babel should not transpile core-js](https://github.com/zloirock/core-js/issues/514#issuecomment-476533317)
exclude: /\/core-js/,
loader: 'babel-loader'
},
{ test: /\.html$/, type: 'asset/resource', generator: { filename: '[name][ext]' } },
{
test: /\.scss$/,
use: [
'style-loader',
'css-loader',
{
loader: 'postcss-loader',
options: { postcssOptions: { plugins: [['postcss-preset-env']] } }
},
'sass-loader'
]
}
]
}
};
module.exports = config;