-
Notifications
You must be signed in to change notification settings - Fork 521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"buildURL" gets reset to parent path of config file after calling "steal.config". #1514
Comments
Can you provide baseURL in the script tag? |
I can't easily for various reasons, but I guess as well it would work that way. My point is more that I was surprised to see my explicitly provided |
If you change it back does it fix your problem? Do the tests pass? |
Change what back to what and which tests? Don't know how to run some of The question is if how |
I meant changing the line that's changed, |
Guten Tag Matthew Phillips,
am Freitag, 8. November 2019 um 16:53 schrieben Sie:
I meant changing the line that's changed, `configSpecial.root.set(
(root === val ? "." : root) +"/");`. If you put that back in your
own `steal.js` file does it fix your app?
No, things have changed too much: "configSpecial" isn't forwarded
anymore and got renamed to "specialConfig" instead, but that doesn't
provide a "root" property anymore. "specialConfig.baseURL" OTOH
provides totally wrong results and breaks as well. Don't think it's
that easy.
Mit freundlichen Grüßen,
Thorsten Schöning
…--
Thorsten Schöning E-Mail: [email protected]
AM-SoFT IT-Systeme http://www.AM-SoFT.de/
Telefon...........05151- 9468- 55
Fax...............05151- 9468- 88
Mobil..............0178-8 9468- 04
AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow
|
Ok, is there any chance you can create a small test where changing the baseURL in stealconfig.js causes things to mess up? That will give me something to debug. |
I've reduced my app to demonstrate the issue. The contents of the following ZIP can be extracted to your web server and afterwards simply browse At the top of
Simply removing I'm using the package manager |
How often can you reproduce it?
Description:
Im using the following script tag to configure and load
steal.js
, which worked perfectly fine with the formerly used version0.16.45
:stealConfig.js
contains a call tosteal.config({...})
with some object containing the keysbaseURL
andpaths
. The latter defines relative paths to JS-files based onbaseURL
and for that to work with my slightly customized directory layout, I need to providebaseURL
additionally as well. By defaultsteal
calculates it to be/[...]/js/config/
in my setup, but I need/[...]/js/
instead.After upgrading to the most current version
2.2.4
, I recognized that at some pointbaseURL
was/[...]/js/config/
again, so loading my files failed. After debugging things, I think I found the problem to be thatbaseURL
really gets reset always during setting configs:https://github.com/stealjs/steal/blame/8df0de1c79df2df1ad778b0e05dfdc18d2ef814d/steal.js#L5867
That line was different in the past:
https://github.com/stealjs/steal/blame/e9343ac2b52447ee11e331f2b90ffd6f1c7cfc11/steal.js#L5031
During debugging I recognized that my
stealConfig.js
get executed and applied first as expected, which especially means thatbaseURL
gets set to my expected value. But afterwards things get additionally configured for myscript
-element:https://github.com/stealjs/steal/blame/8df0de1c79df2df1ad778b0e05dfdc18d2ef814d/steal.js#L6379
While that doesn't contain another
baseURL
, it gets reset anyway becauseconfigSetter
gets called again for at leastdata-config
and contains the line always resettingbaseURL
. The workaround I'm implementing now is using absolute paths in mystealConfig.js
, because I'm able to calculate those in that file.Expected results:
steal.js
should have used my customly providedbaseURL
only, like was the case in the past.Actual results:
steal.js
changedbaseURL
internally to some recalculated value.Environment:
The text was updated successfully, but these errors were encountered: