如何在nuxt.config.js中使用CopyWebpackPlugin?

时间:2020-03-13 12:09:02

标签: nuxt.js

我试图使用它,但它不起作用:

build: {
   extend: (config) => {
            config.plugins.push(
                new CopyWebpackPlugin([
                  {
                    from: path.join(__dirname, 'node_modules/EXAMPLEPACKAGE/static'),
                    to: path.join(__dirname, 'static/example/')
                  }
                ])
            );

    },
},

我也这样尝试过

build: {
    plugins: [
        new CopyWebpackPlugin([
                  {
                    from: path.join(__dirname, 'node_modules/EXAMPLEPACKAGE/static'),
                    to: path.join(__dirname, 'static/example/')
                  }
        ])
    ]
}

如何在nuxt.config.js中使用CopyWebpackPlugin?

0 个答案:

没有答案