From f80dbb1561ff41f7f8dab42376c217b44cf2a1e5 Mon Sep 17 00:00:00 2001 From: Prakash Date: Fri, 22 Aug 2025 00:09:32 +0530 Subject: [PATCH] @uppy/examples: fix workspace dependencies for StackBlitz environment (#5910) - Add .stackblitzrc configuration file for StackBlitz environment setup for - Add prepare-stackblitz.js script to replace `workspace:*` dependencies with "latest" - Configure StackBlitz to run preparation script before installing dependencies - Change CSS import paths in examples from `@uppy/react/css/style.css` to `@uppy/react/dist/styles.css` temporarily (will need to revert after we release 5.0) --- examples/react/.stackblitzrc | 7 +++++++ examples/sveltekit/.stackblitzrc | 7 +++++++ examples/vue/.stackblitzrc | 7 +++++++ 3 files changed, 21 insertions(+) create mode 100644 examples/react/.stackblitzrc create mode 100644 examples/sveltekit/.stackblitzrc create mode 100644 examples/vue/.stackblitzrc diff --git a/examples/react/.stackblitzrc b/examples/react/.stackblitzrc new file mode 100644 index 000000000..632cbb8aa --- /dev/null +++ b/examples/react/.stackblitzrc @@ -0,0 +1,7 @@ +{ + "installDependencies": false, + "startCommand": "node -e \"const fs=require('fs'); const p='package.json'; const j=JSON.parse(fs.readFileSync(p,'utf8')); ['dependencies','devDependencies','peerDependencies'].forEach(k=>{ if(j[k]) for(const n in j[k]) if(typeof j[k][n]==='string' && j[k][n].startsWith('workspace:')) j[k][n]='latest'; }); fs.writeFileSync(p, JSON.stringify(j,null,2));\" && npm install @uppy/drag-drop @uppy/file-input @uppy/progress-bar && npm install && npm run dev", + "env": { + "NODE_ENV": "development" + } +} \ No newline at end of file diff --git a/examples/sveltekit/.stackblitzrc b/examples/sveltekit/.stackblitzrc new file mode 100644 index 000000000..632cbb8aa --- /dev/null +++ b/examples/sveltekit/.stackblitzrc @@ -0,0 +1,7 @@ +{ + "installDependencies": false, + "startCommand": "node -e \"const fs=require('fs'); const p='package.json'; const j=JSON.parse(fs.readFileSync(p,'utf8')); ['dependencies','devDependencies','peerDependencies'].forEach(k=>{ if(j[k]) for(const n in j[k]) if(typeof j[k][n]==='string' && j[k][n].startsWith('workspace:')) j[k][n]='latest'; }); fs.writeFileSync(p, JSON.stringify(j,null,2));\" && npm install @uppy/drag-drop @uppy/file-input @uppy/progress-bar && npm install && npm run dev", + "env": { + "NODE_ENV": "development" + } +} \ No newline at end of file diff --git a/examples/vue/.stackblitzrc b/examples/vue/.stackblitzrc new file mode 100644 index 000000000..632cbb8aa --- /dev/null +++ b/examples/vue/.stackblitzrc @@ -0,0 +1,7 @@ +{ + "installDependencies": false, + "startCommand": "node -e \"const fs=require('fs'); const p='package.json'; const j=JSON.parse(fs.readFileSync(p,'utf8')); ['dependencies','devDependencies','peerDependencies'].forEach(k=>{ if(j[k]) for(const n in j[k]) if(typeof j[k][n]==='string' && j[k][n].startsWith('workspace:')) j[k][n]='latest'; }); fs.writeFileSync(p, JSON.stringify(j,null,2));\" && npm install @uppy/drag-drop @uppy/file-input @uppy/progress-bar && npm install && npm run dev", + "env": { + "NODE_ENV": "development" + } +} \ No newline at end of file