From fdbe59ae02d180024346ea7554e864b9fed3acef Mon Sep 17 00:00:00 2001 From: Blesilda Ramirez Date: Fri, 12 Jul 2024 22:18:05 +0800 Subject: [PATCH] pkp/pkp-lib#9753 [stable-3_3_0] Copy jquery, jquery-ui and jquery-validation files from node_modules to lib/pkp vendor and js/plugins folder --- vue.config.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/vue.config.js b/vue.config.js index 0b69cd5f19..6c28993ff0 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,4 +1,5 @@ var path = require('path'); +const CopyPlugin = require('copy-webpack-plugin'); module.exports = { css: { @@ -34,6 +35,25 @@ module.exports = { hotUpdateChunkFilename: 'hot-updates/hot-update.js', hotUpdateMainFilename: 'hot-updates/hot-update.json' }, + plugins: [ + new CopyPlugin([ + // copy jquery and jquery-ui from node_modules to lib/pkp composer's vendor dir + { + from: 'node_modules/jquery/dist/', + to: '../lib/pkp/lib/vendor/components/jquery/', + }, + { + from: 'node_modules/jquery-ui/dist/*.js', + to: '../lib/pkp/lib/vendor/components/jqueryui/[name].[ext]', + }, + + // copy jquery-validation from node_modules to lib/pkp/js/lib + { + from: 'node_modules/jquery-validation/dist/', + to: '../lib/pkp/js/lib/jquery/plugins/validate/', + }, + ]) + ], resolve: { alias: { '@': path.resolve(__dirname, 'lib/ui-library/src')