ucap-lg-web/config/custom.webpack.config.js

26 lines
571 B
JavaScript
Raw Normal View History

2020-03-27 08:43:47 +00:00
const path = require('path');
module.exports = (config, options) => {
2020-07-11 12:09:04 +00:00
const PRODUCTION =
!!process.env.NODE_ENV && 'production' === process.env.NODE_ENV;
const RENDERER =
!!process.env.NATIVE_ENV && 'renderer' === process.env.NATIVE_ENV;
2020-03-27 08:43:47 +00:00
2020-07-11 12:09:04 +00:00
if (RENDERER) {
config.target = 'electron-renderer';
} else {
config.target = 'web';
config.node = {
global: true,
fs: 'empty'
};
}
2020-03-27 08:43:47 +00:00
2020-05-24 04:46:38 +00:00
config.resolve.alias = {
...config.resolve.alias,
'@ucap/lg-scss': path.resolve(__dirname, '..', 'src/assets/scss')
};
2020-03-27 08:43:47 +00:00
return config;
};