Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
node: {
__dirname: true
},
optimization: {
splitChunks: {
cacheGroups: {
vendor: {
test: /[\\/]node_modules[\\/]/,
name: 'vendor',
chunks: 'all'
}
}
}
},
plugins: [
new VueLoaderPlugin(),
new webpack.DefinePlugin({
'process.env': {
// make sure our simple polyfills are enabled
'NODE_ENV': '"test"'
}
}),
new CopyWebpackPlugin([
{ from: path.join(path.dirname(config.entry), 'static') }
])
],
resolve: {
alias: {
'vue': 'vue/dist/vue.esm.js',
'vue-meta': getVueMetaPath(true)
}
},
export function webpack(config: Configuration) {
return {
...config,
plugins: [...config.plugins, new VueLoaderPlugin()],
module: {
...config.module,
rules: [
...config.module.rules,
{
test: /\.vue$/,
loader: require.resolve('vue-loader'),
options: {},
},
],
},
resolve: {
...config.resolve,
extensions: [...config.resolve.extensions, '.vue'],
alias: {
...config.resolve.alias,