Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multi-currency autoload issue when plugin gets updated #9681

Merged
merged 10 commits into from
Nov 7, 2024
5 changes: 2 additions & 3 deletions tasks/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ rm( 'dist/*.map' );
// copy the directories to the release folder
cp( '-Rf', filesToCopy, targetFolder );

// copy the multi-currency files
mkdir( '-p', targetFolder + '/multi-currency' );
cp( '-R', 'multi-currency/src', targetFolder + '/multi-currency/src' );
// remove the multi-currency/client source files
lovo-h marked this conversation as resolved.
Show resolved Hide resolved
rm( '-rf', targetFolder + '/includes/multi-currency/client' );

const output = fs.createWriteStream(
releaseFolder + '/' + pluginSlug + '.zip'
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"paths": {
"assets/*": [ "../assets/*" ],
"wcpay/*": [ "./*" ],
"multi-currency/*": [ "../multi-currency/client/*" ],
"multi-currency/*": [ "../includes/multi-currency/client/*" ],
"iti/utils": [ "../node_modules/intl-tel-input/build/js/utils" ],
"react": [ "../node_modules/@types/react" ]
},
Expand Down
10 changes: 5 additions & 5 deletions webpack/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ module.exports = {
'subscription-edit-page': './client/subscription-edit-page.js',
tos: './client/tos/index.js',
'payment-gateways': './client/payment-gateways/index.js',
'multi-currency': './multi-currency/client/index.js',
'multi-currency': './includes/multi-currency/client/index.js',
'multi-currency-switcher-block':
'./multi-currency/client/blocks/currency-switcher.js',
'./includes/multi-currency/client/blocks/currency-switcher.js',
'multi-currency-analytics':
'./multi-currency/client/analytics/index.js',
'./includes/multi-currency/client/analytics/index.js',
order: './client/order/index.js',
'subscriptions-empty-state':
'./client/subscriptions-empty-state/index.js',
Expand Down Expand Up @@ -115,14 +115,14 @@ module.exports = {
extensions: [ '.ts', '.tsx', '.json', '.js', '.jsx' ],
modules: [
path.join( process.cwd(), 'client' ),
path.join( process.cwd(), 'multi-currency', 'client' ),
path.join( process.cwd(), 'includes/multi-currency', 'client' ),
lovo-h marked this conversation as resolved.
Show resolved Hide resolved
'node_modules',
],
alias: {
assets: path.resolve( process.cwd(), 'assets' ),
'multi-currency': path.resolve(
process.cwd(),
'multi-currency',
'includes/multi-currency',
ricardo marked this conversation as resolved.
Show resolved Hide resolved
'client'
),
wcpay: path.resolve( process.cwd(), 'client' ),
Expand Down