grandsea_utils
Version:
javascript commom utils[D[D[D[D[D[n
23 lines • 562 B
JavaScript
const webpack = require('webpack')
const path = require('path')
const pkg = require('../package.json')
const rootPath = path.resolve(__dirname, '../')
const config = {
entry: path.resolve(rootPath, 'src', 'index.js'),
output: {
filename: `${pkg.name}.min.js`,
path: path.resolve(rootPath, 'dist'),
library: `${pkg.name}`,
libraryTarget: 'umd'
},
module: {
rules: [{
test: /\.js$/,
loader: 'babel-loader'
}]
},
plugins: [
new webpack.optimize.UglifyJsPlugin()
]
}
module.exports = config