diff --git a/index.html b/index.html index 1164872..b1d3934 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ Ciao - + diff --git a/webpack.config.js b/webpack.config.js index 16701f7..e75ce1e 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,15 +1,27 @@ const path = require('path') -module.exports = ['web', 'node'].map( - target => ({ - name: target, - mode: 'production', - entry: './radiomanifest.js', - target: [target], - output: { - path: path.resolve(__dirname, 'dist'), - filename: 'radiomanifest-' + target + '.bundle.js', - clean: false +const variants = [ + { name: 'web', libtype: 'amd', target: 'web' }, + { name: 'node', libtype: 'amd', target: 'node' }, + { name: 'oldstyle', libtype: 'umd', target: 'web' } +] +module.exports = variants.map( + variant => { + const obj = { + name: variant.name, + mode: 'production', + entry: './radiomanifest.js', + target: [variant.target], + output: { + path: path.resolve(__dirname, 'dist'), + filename: 'radiomanifest-' + variant.name + '.bundle.js', + clean: false, + library: { + name: 'radiomanifest', + type: variant.libtype + } + } } - }) + return obj + } )