-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathwebpack.config.js
35 lines (34 loc) · 1.12 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
const path = require('path');
const webpack = require('webpack');
module.exports = [
{
target: 'node',
node: {
__dirname: false,
__filename: false,
},
externals: {
argparse: 'require("argparse")',
gl: 'require("gl")',
pngjs: 'require("pngjs")',
'jpeg-js': 'require("jpeg-js")'
},
plugins: [
new webpack.DefinePlugin({
__PLUGIN_VERSION_TIMESTAMP__: webpack.DefinePlugin.runtimeValue(() => `${new Date().valueOf()}`, true),
'process.env.DEBUG': JSON.stringify(process.env.DEBUG)
}),
new webpack.BannerPlugin({ banner: "#!/usr/bin/env node", raw: true, entryOnly: true }),
],
resolve: {
modules: [
'node_modules',
path.resolve(__dirname, 'build/src/')
],
},
entry: path.resolve(__dirname, `build/src/index.js`),
output: { filename: `molrender.js`, path: path.resolve(__dirname, `build/bin`) },
mode: 'development',
devtool: 'source-map'
}
];