-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
webpack-skeleton.js
61 lines (59 loc) · 1.33 KB
/
webpack-skeleton.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
const webpack = require('webpack')
const path = require('path')
const NodeTargetPlugin = require('webpack/lib/node/NodeTargetPlugin')
var config = {
entry: {
main: ['./browser/main/index.js']
},
resolve: {
extensions: ['', '.js', '.jsx', '.styl'],
packageMains: [
'webpack',
'browser',
'web',
'browserify',
['jam', 'main'],
'main'
],
alias: {
lib: path.join(__dirname, 'lib'),
browser: path.join(__dirname, 'browser')
}
},
plugins: [new webpack.NoErrorsPlugin(), new NodeTargetPlugin()],
stylus: {
use: [require('nib')()],
import: [
'~nib/lib/nib/index.styl',
path.join(__dirname, 'browser/styles/index.styl')
]
},
externals: [
'prettier',
'node-ipc',
'electron',
'lodash',
'markdown-it',
'moment',
'markdown-it-emoji',
'fs-jetpack',
'@rokt33r/markdown-it-math',
'markdown-it-kbd',
'markdown-it-plantuml',
'markdown-it-admonition',
'markdown-toc',
'devtron',
'@rokt33r/season',
{
react: 'var React',
'react-dom': 'var ReactDOM',
'react-redux': 'var ReactRedux',
codemirror: 'var CodeMirror',
redux: 'var Redux',
raphael: 'var Raphael',
flowchart: 'var flowchart',
'sequence-diagram': 'var Diagram'
}
]
}
module.exports = config