26 lines
571 B
JavaScript
26 lines
571 B
JavaScript
const path = require('path');
|
|
|
|
module.exports = (config, options) => {
|
|
const PRODUCTION =
|
|
!!process.env.NODE_ENV && 'production' === process.env.NODE_ENV;
|
|
const RENDERER =
|
|
!!process.env.NATIVE_ENV && 'renderer' === process.env.NATIVE_ENV;
|
|
|
|
if (RENDERER) {
|
|
config.target = 'electron-renderer';
|
|
} else {
|
|
config.target = 'web';
|
|
config.node = {
|
|
global: true,
|
|
fs: 'empty'
|
|
};
|
|
}
|
|
|
|
config.resolve.alias = {
|
|
...config.resolve.alias,
|
|
'@ucap/lg-scss': path.resolve(__dirname, '..', 'src/assets/scss')
|
|
};
|
|
|
|
return config;
|
|
};
|