Files
iMES_Net/iMES.WebApi/wwwroot/BiManage/JS/JQGrid/grid/validation/webpack.config.js

51 lines
1.2 KiB
JavaScript
Raw Normal View History

2026-02-06 18:34:35 +08:00
'use strict'
const path = require('path')
const webpack = require('webpack')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
module.exports = {
entry: {
main: './main.js'
},
output: {
path: path.resolve(__dirname + '/dist'),
filename: '[name].bundle.js'
},
resolve: {
extensions: ['.js', '.vue'],
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': path.resolve(__dirname + '/src'),
}
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader'
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader'
},
{
test: /\.css$/,
loaders: ['style-loader', 'css-loader']
}
]
},
plugins: [
// strip all the warnings from Vue.js source code.
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
}),
// uglify build code
new UglifyJsPlugin({
// this speeds up the build
parallel: true
})
]
}