Files
docuseal/config/webpack/webpack.config.js
T

51 lines
1.1 KiB
JavaScript
Raw Normal View History

2023-06-24 22:50:12 +03:00
const { globalMutableWebpackConfig, merge } = require('shakapacker')
2023-05-21 17:59:36 +03:00
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
const { VueLoaderPlugin } = require('vue-loader')
2023-06-24 22:50:12 +03:00
const configs = merge(globalMutableWebpackConfig, {
2023-05-21 17:59:36 +03:00
resolve: {
extensions: ['.css', '.scss', '.vue']
},
2023-06-24 18:31:12 +03:00
performance: {
maxEntrypointSize: 0
},
2023-05-21 17:59:36 +03:00
optimization: {
runtimeChunk: false,
splitChunks: {
cacheGroups: {
2023-06-24 18:31:12 +03:00
default: false,
applicationVendors: {
test: /\/node_modules\//,
chunks: chunk => chunk.name === 'application'
},
formVendors: {
test: /\/node_modules\//,
chunks: chunk => chunk.name === 'form'
}
2023-05-21 17:59:36 +03:00
}
}
},
plugins: [
process.env.BUNDLE_ANALYZE && new BundleAnalyzerPlugin(),
new VueLoaderPlugin()
].filter(Boolean)
})
configs.module = merge({
rules: [
{
test: /\.vue$/,
use: [{
loader: 'vue-loader',
options: {
compilerOptions: {
isCustomElement: tag => tag.includes('-')
}
}
}]
}
]
}, configs.module)
module.exports = configs