Title: Converting a vuejs configuration to nuxt 2 config
Tags: vue.js;webpack;nuxt.js
Question: In vue.js I get the next config and I need to convert it to use in Nuxt2.x.
const CopyWebpackPlugin = require('copy-webpack-plugin')
const path = require('path')
const DIST_DIR = path.resolve(__dirname, 'dist')
module.exports = {
chainWebpack: config =&gt; {
config.module
.rule('babel-loader')
.test(/\.js|jsx$/)
.use('babel-loader')
.loader('babel-loader')
.end()
config.resolve.alias.set('cornerstone-wado-image-loader', 'cornerstone-wado-image-loader/dist/dynamic-import/cornerstoneWADOImageLoader.min.js')
configureWebpack: {
plugins: [
new CopyWebpackPlugin({
patterns: [
{
from: path.resolve(__dirname, 'node_modules/cornerstone-wado-image-loader/dist/dynamic-import'),
to: DIST_DIR,
},
],
}),
],
I have tried in Nuxt config something as below, but it doesn't work and I don't know where I put the &quot;alias resolve&quot; portion.
And when I do nuxt run dev, the browse console shows:
&quot;http://localhost:3000/_nuxt/index.worker.min.worker.js&quot;  -- script not found
This script is into &quot;node_modules/cornerstone-wado-image-loader/dist/dynamic-import&quot;
Here is the nuxt.config.js:
const CopyWebpackPlugin = require('copy-webpack-plugin')
const path = require('path')
const DIST_DIR = path.resolve(__dirname, 'dist')
build: {
plugins: [
new CopyPlugin([
{
from: './node_modules/cornerstone-wado-image-loader/dist/dynamic-import',
to:
process.env.NODE_ENV === 'production'
? DIST_DIR
: './_nuxt',
},
]),
Comment: This is usually where you make some additions to Webpack: https://nuxtjs.org/docs/configuration-glossary/configuration-build#extend

Comment: @kissu  I know, but It´s not clear how I can solve my case with that docs



{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 0, 'CommentCount': 2, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2022:00:08/05/22', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<vue.js><webpack><nuxt.js>', 'Title': 'Converting a vuejs configuration to nuxt 2 config', 'ViewCount': 35, 'id': 73250764, 'user_AboutMe': None, 'user_AccountId': 5745136.0, 'user_DisplayName': 'Luiz Alves', 'user_Reputation': 2334.0, 'user_Views': 405.0, 'user_id': 4536580.0}}