-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathwebpack.config.js
34 lines (33 loc) · 956 Bytes
/
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
const webpack = require('webpack');
const path = require('path');
const nodeExternals = require('webpack-node-externals')
module.exports = {
target: 'node',
entry: path.join(__dirname, 'src', 'GitRocketTerminal.jsx'),
output: {
path: path.join(__dirname, 'dist'),
filename: 'index.js',
libraryTarget: 'commonjs'
},
resolve: {
extensions: ['.js', '.jsx', '.json']
},
devtool: 'source-map',
module: {
rules: [
{
test: /\.js|.jsx?$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
cacheDirectory: 'babel_cache',
presets: ['react', 'es2015']
}
}
]
},
externals: [ nodeExternals(), 'hyper/component', 'hyper/notify', 'hyper/decorate', 'react' ],
plugins: [
new webpack.DefinePlugin({ 'global.GENTLY': false })
]
};