mirror of
https://github.com/lrsjng/pagemap.git
synced 2025-08-20 20:02:21 +02:00
Initial commit.
This commit is contained in:
28
webpack.config.js
Normal file
28
webpack.config.js
Normal file
@@ -0,0 +1,28 @@
|
||||
const webpack = require('webpack');
|
||||
const pkg = require('./package.json');
|
||||
const banner = `${pkg.name} v${pkg.version} - ${pkg.homepage}`;
|
||||
|
||||
module.exports = {
|
||||
entry: './lib/pagemap.js',
|
||||
output: {
|
||||
path: './dist',
|
||||
filename: 'pagemap.js',
|
||||
library: 'pagemap',
|
||||
libraryTarget: 'umd'
|
||||
},
|
||||
module: {
|
||||
loaders: [{
|
||||
test: /\.js$/,
|
||||
exclude: /node_modules/,
|
||||
loader: 'babel-loader',
|
||||
query: {
|
||||
cacheDirectory: true,
|
||||
presets: ['es2015']
|
||||
}
|
||||
}]
|
||||
},
|
||||
plugins: [
|
||||
new webpack.BannerPlugin(banner),
|
||||
new webpack.optimize.UglifyJsPlugin()
|
||||
]
|
||||
};
|
Reference in New Issue
Block a user