diff --git a/.gitignore b/.gitignore index 1aae30a..2a516d1 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ node_modules/ .nyc_output coverage dist -compiled.js +bundled.js +es5.js diff --git a/webpack.config.js b/webpack.config.js index a559df6..12b8a9a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -3,7 +3,10 @@ const path = require('path'); module.exports = { mode: 'production', // "production" | "development" | "none" // Chosen mode tells webpack to use its built-in optimizations accordingly. - entry: ['babel-polyfill', './src/bowser.js'], // string | object | array + entry: { + bundled: ['babel-polyfill', './src/bowser.js'], + es5: './src/bowser.js', + }, // string | object | array // defaults to ./src // Here the application starts executing // and webpack starts bundling @@ -12,7 +15,7 @@ module.exports = { path: path.resolve(__dirname, './'), // string // the target directory for all output files // must be an absolute path (use the Node.js path module) - filename: 'compiled.js', // string + filename: '[name].js', // string // the filename template for entry chunks library: 'bowser', libraryTarget: 'umd', // universal module definition