pbu-local-url
Version:
seentao local url-parse
47 lines (44 loc) • 1.05 kB
JavaScript
var path = require('path');
var webpack = require('webpack');
var config = {
entry: path.resolve(__dirname, './url.js'),
output: {
path: path.resolve(__dirname, './'),
library: 'pbu-local-url',
libraryTarget: 'umd',
filename: 'index.js',
},
devServer: {
historyApiFallback: true
},
plugins: [
new webpack.DefinePlugin({
// 消除警告
"process.env": {
NODE_ENV: JSON.stringify("production")
}
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
})
],
resolve: {
extensions: ['', '.js']
},
module: {
noParse: [],
loaders: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['es2015', 'stage-2']
}
}
]
}
};
module.exports = config;