fix: Include SPA dist folders in production build

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
This commit is contained in:
Dwindi Ramadhana
2025-12-30 17:21:38 +07:00
parent 8762c7d2c9
commit f1bab5ec46

View File

@@ -33,7 +33,6 @@ rsync -av --progress \
--exclude='.git' \ --exclude='.git' \
--exclude='.gitignore' \ --exclude='.gitignore' \
--exclude='build' \ --exclude='build' \
--exclude='dist' \
--exclude='*.log' \ --exclude='*.log' \
--exclude='.DS_Store' \ --exclude='.DS_Store' \
--exclude='customer-spa/src' \ --exclude='customer-spa/src' \
@@ -46,16 +45,26 @@ rsync -av --progress \
--exclude='customer-spa/tsconfig.json' \ --exclude='customer-spa/tsconfig.json' \
--exclude='customer-spa/tsconfig.node.json' \ --exclude='customer-spa/tsconfig.node.json' \
--exclude='customer-spa/index.html' \ --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/src' \
--exclude='admin-spa/public' \ --exclude='admin-spa/public' \
--exclude='admin-spa/node_modules' \ --exclude='admin-spa/node_modules' \
--exclude='admin-spa/.vite' \ --exclude='admin-spa/.vite' \
--exclude='admin-spa/.cert' \
--exclude='admin-spa/package.json' \ --exclude='admin-spa/package.json' \
--exclude='admin-spa/package-lock.json' \ --exclude='admin-spa/package-lock.json' \
--exclude='admin-spa/vite.config.ts' \ --exclude='admin-spa/vite.config.ts' \
--exclude='admin-spa/tsconfig.json' \ --exclude='admin-spa/tsconfig.json' \
--exclude='admin-spa/tsconfig.node.json' \ --exclude='admin-spa/tsconfig.node.json' \
--exclude='admin-spa/index.html' \ --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='examples' \
--exclude='*.sh' \ --exclude='*.sh' \
--exclude='*.md' \ --exclude='*.md' \