Skip to content

Commit

Permalink
fix: env-var passing and output folder name
Browse files Browse the repository at this point in the history
  • Loading branch information
hlolli committed Dec 10, 2024
1 parent 35c1ae3 commit 70ec2e9
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/develop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
run: |
yarn install
PUBLIC_URL="https://csound-ide-dev.web.app" yarn build:dev
cp build/index.html functions
cp dist/index.html functions
cd functions
yarn install
yarn build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
run: |
yarn install
PUBLIC_URL="https://ide.csound.com" PRODUCTION=1 yarn build
cp build/index.html functions
cp dist/index.html functions
cd functions
yarn install
yarn build
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ firebase-debug.log

# production
/build
dist

# misc
.DS_Store
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@
"url-loader": "4.1.1",
"uuid": "^11.0.3",
"vite-plugin-checker": "^0.8.0",
"vite-plugin-environment": "^1.1.3",
"vite-plugin-svgr": "^4.3.0",
"webpack": "5.97.1",
"webpack-cli": "^5.1.4",
Expand Down
7 changes: 5 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@ import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import viteTsconfigPaths from "vite-tsconfig-paths";
import svgr from "vite-plugin-svgr";
import EnvironmentPlugin from "vite-plugin-environment";
import checker from "vite-plugin-checker";
import viteRawPlugin from "vite-raw-plugin";

export default defineConfig({
define: {
"process.env.REACT_APP_DATABASE": JSON.stringify(
process.env.REACT_APP_DATABASE
)
},
// depending on your application, base can also be "/"
base: "",
plugins: [
Expand All @@ -22,7 +26,6 @@ export default defineConfig({
}),
viteTsconfigPaths(),
svgr(),
EnvironmentPlugin(["REACT_APP_DATABASE"]),
viteRawPlugin({
fileRegex: /\.csd|\.orc\.sco\.udo$/
})
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17616,11 +17616,6 @@ vite-plugin-checker@^0.8.0:
vscode-languageserver-textdocument "^1.0.1"
vscode-uri "^3.0.2"

vite-plugin-environment@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/vite-plugin-environment/-/vite-plugin-environment-1.1.3.tgz#d01a04abb2f69730a4866c9c9db51d3dab74645b"
integrity sha512-9LBhB0lx+2lXVBEWxFZC+WO7PKEyE/ykJ7EPWCq95NEcCpblxamTbs5Dm3DLBGzwODpJMEnzQywJU8fw6XGGGA==

vite-plugin-svgr@^4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/vite-plugin-svgr/-/vite-plugin-svgr-4.3.0.tgz#742f16f11375996306c696ec323e4d23f6005075"
Expand Down

0 comments on commit 70ec2e9

Please sign in to comment.