-
Notifications
You must be signed in to change notification settings - Fork 1
/
grommet-toolbox.config.js
49 lines (46 loc) · 1.24 KB
/
grommet-toolbox.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import path from 'path';
import webpack from 'webpack';
const argv = require('yargs').argv;
const NODE_ENV = argv.NODE_ENV;
export default {
copyAssets: [
'src/index.html',
{
asset: 'src/assets/**',
dist: 'dist/assets/'
}
],
jsAssets: ['src/**/*.js'],
mainJs: 'src/index.js',
webpack: {
resolve: {
root: [
path.resolve(__dirname, './node_modules')
]
},
plugins: [
new webpack.ProvidePlugin({
fetch: 'imports?this=>global!exports?global.fetch!whatwg-fetch'
})
]
},
env: {
'process.env': {
NODE_ENV: JSON.stringify(NODE_ENV || process.env.NODE_ENV || 'development'),
}
},
devServerPort: 8010,
devServerProxy: {
"/rest/*": 'http://localhost:8114'
},
alias: {
'grommet-templates': path.resolve(__dirname, '../grommet-templates/src/js'),
'grommet-index/scss': path.resolve(__dirname, '../grommet-index/src/scss'),
'grommet-index': path.resolve(__dirname, '../grommet-index/src/js'),
'grommet/scss': path.resolve(__dirname, '../grommet/src/scss'),
'grommet': path.resolve(__dirname, '../grommet/src/js')
},
devPreprocess: ['set-webpack-alias'],
distPreprocess: ['set-webpack-alias'],
preCommitTasks: ['jslint','scsslint'],
};