-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
41 lines (40 loc) · 1019 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
35
36
37
38
39
40
41
/**
* Webpack configuration file.
*/
const path = require('path');
const pkg = require('./package.json');
module.exports = {
context: path.resolve(__dirname, 'build/prebuild'),
entry: `./v${ pkg.version }/js/TicTacToe.js`,
resolve: {
alias: {
/**
* Use the minified HTML files (generated by the "build-html-preminify" NPM script)
* instead of the HTML files in the src directory.
*/
'../html': '../../../tmp/html',
/**
* Tell webpack where to find the infuse.host source code files.
*/
'./libs/infuse.host': 'infuse.host/src',
},
},
module: {
rules: [{
test: /\.html$/,
use: [{
// Use the "infuse-loader" to load HTML files.
loader: 'infuse-loader',
options: {
// Tell webpack where to find the infuse.host configs file.
configsPath: 'infuse.host/src/configs.js',
},
}],
}],
},
// Write the output to build/dist/js/bundle.js
output: {
path: path.resolve(__dirname, `build/dist/v${ pkg.version }/js`),
filename: 'bundle.js'
},
};