From 6738b517819db7a7081abec2c16c47559657c593 Mon Sep 17 00:00:00 2001 From: Willian Galvani Date: Tue, 28 Feb 2023 04:47:02 -0300 Subject: [PATCH] update config for new webpackcopyplugin --- build/webpack.prod.conf.js | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/build/webpack.prod.conf.js b/build/webpack.prod.conf.js index aa3cf917..7e68d2d9 100644 --- a/build/webpack.prod.conf.js +++ b/build/webpack.prod.conf.js @@ -83,23 +83,16 @@ const webpackConfig = merge(baseWebpackConfig, { }), // enable scope hoisting new webpack.optimize.ModuleConcatenationPlugin(), - - // copy custom static assets - new CopyWebpackPlugin([ - { - from: path.resolve(__dirname, '../static'), - to: config.build.assetsSubDirectory, - ignore: ['.*'] - } - ]), - new CopyWebpackPlugin([ - {from: path.join(cesiumSource, 'Assets'), to: 'Assets'}, - {from: path.join(cesiumSource, 'Widgets'), to: 'Widgets'}, - {from: cesiumWorkers, to: 'Workers'}, - // {from: path.join(cesiumSource, 'ThirdParty'), to: 'ThirdParty'}, - // {from: path.join(cesiumSource, '../Build/Cesium/ThirdParty/Workers'), to: 'ThirdParty/Workers', force: true}, - // {from: path.join(cesiumSource, '../Build/Cesium/Workers'), to: 'Workers', force: true} - ]) + new CopyWebpackPlugin({ + patterns: [ + {from: path.join(cesiumSource, 'Assets'), to: 'Assets'}, + {from: path.join(cesiumSource, 'Widgets'), to: 'Widgets'}, + {from: cesiumWorkers, to: 'Workers'}, + // {from: path.join(cesiumSource, 'ThirdParty'), to: 'ThirdParty'}, + // {from: path.join(cesiumSource, '../Build/Cesium/ThirdParty/Workers'), to: 'ThirdParty/Workers', force: true}, + // {from: path.join(cesiumSource, '../Build/Cesium/Workers'), to: 'Workers', force: true} + ] + }) ] })