next-ucap-messenger/config/angular.webpack.config.js

27 lines
562 B
JavaScript
Raw Permalink Normal View History

2019-11-01 04:42:08 +00:00
const path = require('path');
2019-09-18 06:02:21 +00:00
module.exports = (config, options) => {
const PRODUCTION = process.env.NODE_ENV === 'production';
2019-11-11 06:53:39 +00:00
const BROWSER = process.env.UCAP_ENV_RUNTIME === 'BROWSER';
2019-09-18 06:02:21 +00:00
2019-11-11 06:53:39 +00:00
if (!BROWSER) {
config.target = 'electron-renderer';
} else {
config.target = 'web';
config.node = {
2019-11-12 09:54:21 +00:00
fs: 'empty',
2019-11-11 06:53:39 +00:00
};
}
2019-09-18 06:02:21 +00:00
2019-11-01 04:42:08 +00:00
config.resolve.alias = {
...config.resolve.alias,
'@ucap-webmessenger-scss/ui': path.resolve(
__dirname,
'..',
'projects/ucap-webmessenger-ui/src/assets/scss'
2019-11-12 09:54:21 +00:00
),
2019-11-01 04:42:08 +00:00
};
2019-09-18 06:02:21 +00:00
return config;
};