-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.interpreter.config.dist.js
34 lines (32 loc) · 1.11 KB
/
webpack.interpreter.config.dist.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
// `CheckerPlugin` is optional. Use it if you want async error reporting.
// We need this plugin to detect a `--watch` mode. It may be removed later
// after https://github.com/webpack/webpack/issues/3460 will be resolved.
//const { CheckerPlugin } = require('awesome-typescript-loader')
const path = require('path')
const webpack = require('webpack')
//from https://remarkablemark.org/blog/2016/09/22/webpack-build-umd/
module.exports = {
entry: './simulation/machine/AbstractMachine.ts',
output: {
path: path.resolve(__dirname, './distMisc/interpreter'),
filename: 'bbgi.js',
// export to AMD, CommonJS, or window
libraryTarget: 'umd',
// the name exported to window
library: 'bbgi' //basic board game interpreter
},
module: {
loaders: [
{test: /\.tsx?$/, loader: "awesome-typescript-loader", exclude: /node_modules/},
{enforce: "pre", test: /\.js$/, exclude: /node_modules/}, // loader: "source-map-loader",
]
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': '"development"'
}),
],
resolve: {
extensions: [".ts", ".tsx", ".js"]
}
}