From f1bab5ec46c1bfe7bd46005dc6d9a2e6b14b596c Mon Sep 17 00:00:00 2001 From: Dwindi Ramadhana Date: Tue, 30 Dec 2025 17:21:38 +0700 Subject: [PATCH] fix: Include SPA dist folders in production build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: Production zip was only 692K instead of expected 2.5MB+ Root Cause: Global --exclude='dist' was removing SPA build folders Solution: - Removed global dist exclusion - Added specific exclusions for dev config files: - tailwind.config.js/cjs - postcss.config.js/cjs - .eslintrc.cjs - components.json - .cert directory Result: ✅ Production zip now 5.2M (correct size) ✅ Customer SPA dist included (480K) ✅ Admin SPA dist included (2.6M) ✅ No dev config files in package Verified: - Activation hook creates pages with correct shortcodes: - [woonoow_shop] - [woonoow_cart] - [woonoow_checkout] - [woonoow_account] - Installer reuses existing WooCommerce pages if available - Sets WooCommerce HPOS enabled on activation --- build-production.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/build-production.sh b/build-production.sh index 9a1cda7..da0fc2f 100755 --- a/build-production.sh +++ b/build-production.sh @@ -33,7 +33,6 @@ rsync -av --progress \ --exclude='.git' \ --exclude='.gitignore' \ --exclude='build' \ - --exclude='dist' \ --exclude='*.log' \ --exclude='.DS_Store' \ --exclude='customer-spa/src' \ @@ -46,16 +45,26 @@ rsync -av --progress \ --exclude='customer-spa/tsconfig.json' \ --exclude='customer-spa/tsconfig.node.json' \ --exclude='customer-spa/index.html' \ + --exclude='customer-spa/tailwind.config.js' \ + --exclude='customer-spa/postcss.config.js' \ + --exclude='customer-spa/.eslintrc.cjs' \ --exclude='admin-spa/src' \ --exclude='admin-spa/public' \ --exclude='admin-spa/node_modules' \ --exclude='admin-spa/.vite' \ + --exclude='admin-spa/.cert' \ --exclude='admin-spa/package.json' \ --exclude='admin-spa/package-lock.json' \ --exclude='admin-spa/vite.config.ts' \ --exclude='admin-spa/tsconfig.json' \ --exclude='admin-spa/tsconfig.node.json' \ --exclude='admin-spa/index.html' \ + --exclude='admin-spa/tailwind.config.js' \ + --exclude='admin-spa/tailwind.config.cjs' \ + --exclude='admin-spa/postcss.config.js' \ + --exclude='admin-spa/postcss.config.cjs' \ + --exclude='admin-spa/components.json' \ + --exclude='admin-spa/.eslintrc.cjs' \ --exclude='examples' \ --exclude='*.sh' \ --exclude='*.md' \