Skip to content

Commit

Permalink
chore(ci): do not use relative asset paths in prod builds (#613)
Browse files Browse the repository at this point in the history
* chore(ci): do not check markdowns in ci

* chore(ci): do not check markdown in ci

* chore(ci): do not use relative paths in apps

* chore(ci): do not use relative paths in apps
  • Loading branch information
andypf authored Nov 15, 2024
1 parent 1ee3698 commit e71bd51
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/build-vite-app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ build_folder=$(dirname $entry_file)
package_name=$(jq -r '.name' $PACKAGE_PATH/package.json)

# Run build using turbo
npx turbo run build:static --filter $package_name
npx turbo run build:static --filter $package_name -- --base ./

# Copy build folder to deploy path
mkdir -p "$DEPLOY_PATH/$TARGET_FOLDER"
cp -r "$PACKAGE_PATH/$build_folder/." "$DEPLOY_PATH/$TARGET_FOLDER"

# Generate appProps.json if APP_PROPS_BASE64 is non-empty
if [ -n "$APP_PROPS_BASE64" ]; then
echo "$APP_PROPS_BASE64" | base64 -d > "$DEPLOY_PATH/$TARGET_FOLDER/appProps.json"
echo "$APP_PROPS_BASE64" | base64 -d >"$DEPLOY_PATH/$TARGET_FOLDER/appProps.json"
fi
1 change: 0 additions & 1 deletion apps/carbon/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export default defineConfig(({ mode }) => {
if (mode === "static") {
return {
...sharedConfig,
base: "./", // Relative Path in Generated index.html
build: {
outDir: "build",
},
Expand Down
1 change: 0 additions & 1 deletion apps/doop/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export default defineConfig(({ mode }) => {
if (mode === "static") {
return {
...sharedConfig,
base: "./", // Relative Path in Generated index.html
build: {
outDir: "build",
},
Expand Down
1 change: 0 additions & 1 deletion apps/example/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export default defineConfig(({ mode }) => {
if (mode === "static") {
return {
...sharedConfig,
base: "./", // Relative Path in Generated index.html
build: {
outDir: "build",
},
Expand Down
1 change: 0 additions & 1 deletion apps/greenhouse/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export default defineConfig(({ mode }) => {
if (mode === "static") {
return {
...sharedConfig,
base: "./", // Relative Path in Generated index.html
build: {
outDir: "build",
},
Expand Down
1 change: 0 additions & 1 deletion apps/heureka/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export default defineConfig(({ mode }) => {
if (mode === "static") {
return {
...sharedConfig,
base: "./", // Relative Path in Generated index.html
build: {
outDir: "build",
},
Expand Down
1 change: 0 additions & 1 deletion apps/supernova/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export default defineConfig(({ mode }) => {
if (mode === "static") {
return {
...sharedConfig,
base: "./", // Relative Path in Generated index.html
build: {
outDir: "build",
},
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e71bd51

Please sign in to comment.