diff --git a/.gitignore b/.gitignore index 3c3629e..deb6e8e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules +dist/*.js diff --git a/package.json b/package.json index 63fb6f1..29bc309 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000..434466e --- /dev/null +++ b/webpack.config.js @@ -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)