mirror of
https://github.com/lancedikson/bowser
synced 2024-10-27 20:34:22 +00:00
Compile 2 versions of files (es5 and bundled)
This commit is contained in:
parent
3e8152bb18
commit
8e9a6c7b4a
3
.gitignore
vendored
3
.gitignore
vendored
@ -3,4 +3,5 @@ node_modules/
|
||||
.nyc_output
|
||||
coverage
|
||||
dist
|
||||
compiled.js
|
||||
bundled.js
|
||||
es5.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
|
||||
|
Loading…
Reference in New Issue
Block a user