hi aniolekx,
Here’s a sample webpack config which we use with Vue.js
'use strict'
const path = require('path')
const webpack = require('webpack')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
module.exports = {
entry: {
chart_lineseries: './src/chart/lineseries/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
})
]
}
You may look at it and apply it in your case.
Regards,
Peter Stoev
jQWidgets team
https://www.jqwidgets.com