-
Notifications
You must be signed in to change notification settings - Fork 10
/
webpack.config.js
35 lines (33 loc) · 1.26 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// this custom webpack config is for issue with @angular/cli and crypto
// https://github.com/angular/angular-cli/issues/1548#issuecomment-450891241
const path = require('path');
const appSrc = './src';
module.exports = {
node: {
path: true,
crypto: true,
fs: 'empty'
},
// optimization: {
// minimize: false
// },
resolve: {
extensions: ['*', '.js', '.ts', '.scss', '.png', '.jpg', '.jpeg', '.svg', '.otf', '.ttf'],
modules: [
__dirname,
path.join(__dirname, 'node_modules'),
path.join(__dirname, 'src')
],
alias: {
'@': path.resolve(__dirname, `${ appSrc }`),
'src/styles': path.resolve(__dirname, `${ appSrc }/styles`),
'@assets': path.resolve(__dirname, `${ appSrc }/assets`),
'@images': path.resolve(__dirname, `${ appSrc }/assets/images`),
'@fonts': path.resolve(__dirname, `${ appSrc }/assets/fonts`),
'@app': path.resolve(__dirname, `${ appSrc }/app`),
'@models': path.resolve(__dirname, `${ appSrc }/models`),
'@share': path.resolve(__dirname, `${ appSrc }/app/share`),
'@popup': path.resolve(__dirname, `${ appSrc }/app/popup`),
}
}
};