W72crm_web-master/node_modules/pinyin-match/webpack.config.js

30 lines
606 B
JavaScript

const path = require('path')
const webpack = require('webpack')
module.exports = {
entry: path.resolve(__dirname, 'src', 'index.js'),
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'main.js',
library: 'PinyinMatch',
globalObject: 'typeof self !== \'undefined\' ? self : this',
libraryTarget: 'umd'
},
module: {
rules: [{
test: /\.js$/,
use: [{
loader: 'babel-loader',
options: {
presets: [
'env'
]
}
}]
}]
},
plugins: [
new webpack.optimize.ModuleConcatenationPlugin()
]
}