forked from skyrim/hlviewer.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.tools.js
55 lines (54 loc) · 1.26 KB
/
webpack.config.tools.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
var fs = require('fs')
var webpack = require('webpack')
var path = require('path')
var CheckerPlugin = require('awesome-typescript-loader').CheckerPlugin
var nodeExternals = require('webpack-node-externals')
var license = fs.readFileSync('LICENSE', 'utf8')
module.exports = {
mode: 'development',
entry: {
wadexporter: './tools/WadExporter/index.ts'
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, './dist')
},
devtool: 'source-map',
module: {
rules: [
{
test: /\.ts?$/,
include: [
path.resolve(__dirname, './src'),
path.resolve(__dirname, './tools')
],
exclude: [],
use: [
{
loader: 'awesome-typescript-loader',
options: {
configFileName: 'tsconfig.tools.json'
}
}
]
}
]
},
resolve: {
extensions: ['.js', '.ts', '.tsx', '.jsx']
},
plugins: [
new CheckerPlugin(),
new webpack.BannerPlugin({
banner: license
}),
new webpack.DefinePlugin({
VERSION: JSON.stringify(require('./package.json').version)
})
],
target: 'node',
externals: [nodeExternals()],
node: {
__dirname: false
}
}