|
|
@ -3,7 +3,10 @@ const path = require('path');
|
|
|
|
module.exports = {
|
|
|
|
module.exports = {
|
|
|
|
mode: 'production', // "production" | "development" | "none"
|
|
|
|
mode: 'production', // "production" | "development" | "none"
|
|
|
|
// Chosen mode tells webpack to use its built-in optimizations accordingly.
|
|
|
|
// 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
|
|
|
|
// defaults to ./src
|
|
|
|
// Here the application starts executing
|
|
|
|
// Here the application starts executing
|
|
|
|
// and webpack starts bundling
|
|
|
|
// and webpack starts bundling
|
|
|
@ -12,7 +15,7 @@ module.exports = {
|
|
|
|
path: path.resolve(__dirname, './'), // string
|
|
|
|
path: path.resolve(__dirname, './'), // string
|
|
|
|
// the target directory for all output files
|
|
|
|
// the target directory for all output files
|
|
|
|
// must be an absolute path (use the Node.js path module)
|
|
|
|
// 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
|
|
|
|
// the filename template for entry chunks
|
|
|
|
library: 'bowser',
|
|
|
|
library: 'bowser',
|
|
|
|
libraryTarget: 'umd', // universal module definition
|
|
|
|
libraryTarget: 'umd', // universal module definition
|
|
|
|