next-ucap-messenger/config/angular.webpack.config.js
2019-11-11 15:53:39 +09:00

29 lines
611 B
JavaScript

const path = require('path');
module.exports = (config, options) => {
const PRODUCTION = process.env.NODE_ENV === 'production';
const BROWSER = process.env.UCAP_ENV_RUNTIME === 'BROWSER';
console.log('BROWSER', BROWSER, config.target);
if (!BROWSER) {
config.target = 'electron-renderer';
} else {
config.target = 'web';
config.node = {
fs: 'empty'
};
}
config.resolve.alias = {
...config.resolve.alias,
'@ucap-webmessenger-scss/ui': path.resolve(
__dirname,
'..',
'projects/ucap-webmessenger-ui/src/assets/scss'
)
};
return config;
};