File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1168,13 +1168,16 @@ const loadPreset = (preset: string) => {
1168
1168
// Load legacy v1.x scripts
1169
1169
const loadLegacyScripts = async () => {
1170
1170
return new Promise ((resolve , reject ) => {
1171
+ // Get base URL for correct path resolution in production
1172
+ const baseUrl = import .meta .env .BASE_URL || ' /' ;
1173
+
1171
1174
// Load Raphael first
1172
1175
const raphaelScript = document .createElement (' script' );
1173
- raphaelScript .src = ' / raphael.min.js' ;
1176
+ raphaelScript .src = ` ${ baseUrl } raphael.min.js` ;
1174
1177
raphaelScript .onload = () => {
1175
1178
// Then load JustGage v1
1176
1179
const justgageScript = document .createElement (' script' );
1177
- justgageScript .src = ' / justgage.js' ;
1180
+ justgageScript .src = ` ${ baseUrl } justgage.js` ;
1178
1181
justgageScript .onload = () => resolve (true );
1179
1182
justgageScript .onerror = () => reject (new Error (' Failed to load justgage.js' ));
1180
1183
document .head .appendChild (justgageScript );
Original file line number Diff line number Diff line change 28
28
"test:watch" : " node --test --watch tests/**/*.test.js" ,
29
29
"lint" : " eslint src/ tests/" ,
30
30
"lint:fix" : " eslint --fix src/ tests/" ,
31
+ "docs" : " cd docs && npm run dev" ,
31
32
"release" : " read -p 'GITHUB_TOKEN: ' GITHUB_TOKEN && export GITHUB_TOKEN=$GITHUB_TOKEN && release-it"
32
33
},
33
34
"repository" : {
You can’t perform that action at this time.
0 commit comments