-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.prod.js
37 lines (36 loc) · 1.12 KB
/
webpack.config.prod.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
const path = require('path');
module.exports = {
entry: {
'rngparser': './src/rng-parser.ts',
// interface: './src/interface/index.ts',
// parser: './src/parser/index.ts'
},
module: {
rules: [{
test: /\.tsx?$/,
exclude: /node_modules/,
loader: 'ts-loader',
}, {
test: /\.xsl$/i,
use: 'raw-loader'
}],
},
output: {
filename: '[name].js',
// Path on disk for output file
path: path.resolve(__dirname, 'dist'),
// Path in webpack-dev-server for compiled files (has priority over disk files in case both exist)
publicPath: '/dist/',
clean: true, // clean previous outputs prior to compiling
library: ['RngParser'] // add all exports to the global RngParser object
},
resolve: {
extensions: ['.js', '.ts'], // enable autocompleting .ts and .js extensions when using import '...'
alias: {
// Enable importing source files by their absolute path by prefixing with "@/"
// Note: this also requires typescript to be able to find the imports (though it doesn't use them other than for type checking), see tsconfig.json
"@": path.join(__dirname, "src"),
}
},
// devtool: "eval-source-map",
};