webpack
This commit is contained in:
parent
a6333141a9
commit
2c944faff3
3 changed files with 20 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
node_modules
|
||||
dist/*.js
|
||||
|
|
|
@ -26,7 +26,8 @@
|
|||
"karma-mocha": "^2.0.1",
|
||||
"karma-webpack": "^5.0.0",
|
||||
"mocha": "^9.1.3",
|
||||
"webpack": "^5.64.1"
|
||||
"webpack": "^5.64.1",
|
||||
"webpack-cli": "^4.9.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"isomorphic-unfetch": "^3.1.0"
|
||||
|
|
17
webpack.config.js
Normal file
17
webpack.config.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
const path = require('path');
|
||||
|
||||
module.exports = []
|
||||
for(let target of ['web', 'node']) {
|
||||
var conf = {
|
||||
name: target,
|
||||
entry: './radiomanifest.js',
|
||||
target: [target],
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
filename: 'radiomanifest-' + target + '.bundle.js',
|
||||
clean: false,
|
||||
},
|
||||
}
|
||||
module.exports.push(conf)
|
||||
}
|
||||
console.log(module.exports)
|
Loading…
Reference in a new issue