-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
36 lines (35 loc) · 1.1 KB
/
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
const path = require('path');
const defaultConfig = require('@wordpress/scripts/config/webpack.config');
module.exports = {
...defaultConfig,
entry: './block-editor/index.js',
resolve: {
...defaultConfig.resolve,
fallback: {
"path": require.resolve("path-browserify")
},
alias: {
...defaultConfig.resolve.alias,
'@components': path.resolve(__dirname, 'block-editor/components'),
'@icons': path.resolve(__dirname, 'block-editor/icons'),
'@utils': path.resolve(__dirname, 'block-editor/utils'),
'@services': path.resolve(__dirname, 'block-editor/services'),
'@scss': path.resolve(__dirname, 'block-editor/scss'),
},
fullySpecified: false,
},
module: {
...defaultConfig.module,
rules: [
{
test: /\.scss$/,
use: [
'css-loader',
'postcss-loader',
'sass-loader',
],
},
...defaultConfig.module.rules,
],
},
};