-
Notifications
You must be signed in to change notification settings - Fork 1
/
.neutrinorc.js
65 lines (59 loc) · 1.45 KB
/
.neutrinorc.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
const browsers = require('browserslist')();
const {basename} = require('path');
// Load .env vars
const dotenv = require('dotenv').config();
module.exports = {
options: {
output: 'public/build',
},
use: neutrino => {
neutrino.use('@neutrinojs/web', {
html: false,
publicPath: `/${basename(neutrino.options.output)}/`,
devServer: {
proxy: process.env.DEV_SERVER_PROXY,
},
targets: {browsers},
style: {
test: /\.s?css$/,
modulesTest: /\.module\.s?css$/,
loaders: [
{
useId: 'postcss',
loader: require.resolve('postcss-loader'),
options: {
config: {
path: neutrino.options.root,
ctx: {
basePath: neutrino.options.source
}
},
},
}
]
},
minify: {
babel: {
removeConsole: true,
removeDebugger: true
}
},
});
neutrino.use('@neutrinojs/eslint', {
eslint: {
baseConfig: {
extends: '@fusionary/eslint-config',
}
}
});
neutrino.use('@neutrinojs/stylelint');
neutrino.config.module
.when(process.env.NODE_ENV === 'development', module => {
module.rule('jquery')
.test(require.resolve('jquery'))
.use('jquery')
.loader('expose-loader')
.options('$');
});
}
};