2022-01-09 17:56:10 -05:00
|
|
|
const path = require('path');
|
2022-12-30 09:25:21 -05:00
|
|
|
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
2022-01-09 17:56:10 -05:00
|
|
|
|
2022-07-21 11:17:53 -04:00
|
|
|
module.exports = {
|
|
|
|
mode: 'production',
|
2022-01-09 17:56:10 -05:00
|
|
|
entry: {
|
|
|
|
bundle: [
|
|
|
|
'./src/main.js',
|
2022-07-21 11:17:53 -04:00
|
|
|
],
|
2022-01-09 17:56:10 -05:00
|
|
|
style: [
|
|
|
|
'./src/style.js',
|
|
|
|
]
|
|
|
|
},
|
|
|
|
output: {
|
2022-07-21 11:17:53 -04:00
|
|
|
path: path.resolve(__dirname, './static/dist'),
|
|
|
|
publicPath: '/dist/',
|
|
|
|
filename: '[name].min.js'
|
2020-05-14 19:13:33 -04:00
|
|
|
},
|
2022-01-09 17:56:10 -05:00
|
|
|
plugins: [
|
2022-12-30 09:25:21 -05:00
|
|
|
// new BundleAnalyzerPlugin(),
|
2022-01-09 17:56:10 -05:00
|
|
|
],
|
|
|
|
module: {
|
2022-07-21 11:17:53 -04:00
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.css$/,
|
|
|
|
use: [
|
|
|
|
'vue-style-loader',
|
|
|
|
'css-loader'
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.js$/,
|
|
|
|
//exclude: /node_modules\/(?!bootstrap-vue\/src\/)/,
|
|
|
|
exclude: /node_modules/,
|
|
|
|
loader: 'babel-loader',
|
|
|
|
options: {
|
|
|
|
presets: ['@babel/preset-env']
|
|
|
|
}
|
|
|
|
},
|
|
|
|
],
|
2022-01-09 17:56:10 -05:00
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
2022-07-21 11:17:53 -04:00
|
|
|
'vue$': 'vue/dist/vue.esm.js',
|
2022-12-30 09:25:21 -05:00
|
|
|
//'bootstrap-vue$': 'bootstrap-vue/src/index.js',
|
|
|
|
// [path.resolve(__dirname, "../node_modules/bootstrap-vue/esm/icons/icons.js")]: false,
|
2022-01-09 17:56:10 -05:00
|
|
|
},
|
|
|
|
extensions: ['*', '.js', '.vue', '.json']
|
|
|
|
},
|
2022-07-21 11:17:53 -04:00
|
|
|
}
|
2020-05-14 19:13:33 -04:00
|
|
|
|