forked from alibaba/lowcode-plugins
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.plugin.js
More file actions
18 lines (18 loc) · 479 Bytes
/
build.plugin.js
File metadata and controls
18 lines (18 loc) · 479 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
module.exports = ({ onGetWebpackConfig }) => {
// see: https://github.com/ice-lab/build-scripts#%E6%8F%92%E4%BB%B6%E5%BC%80%E5%8F%91
onGetWebpackConfig((config) => {
config.merge({
node: {
fs: 'empty',
},
});
config.module // fixes https://github.com/graphql/graphql-js/issues/1272
.rule('mjs$')
.test(/\.mjs$/)
.include
.add(/node_modules/)
.end()
.type('javascript/auto');
return config;
});
};