snowpack doesn't respect baseUrl with script paths #2784
Unanswered
jprochazk
asked this question in
Troubleshooting
Replies: 2 comments 1 reply
-
I think snowpack does not run anything on the public folder maybe you can do that using a plugin that does |
Beta Was this translation helpful? Give feedback.
0 replies
-
AFAIK that's the expected behaviour from browsers assuming you have defined the <base href="test" />
<script type="module" src="dist/index.js"> <!--without the leading slash--> Will make the <base href="%PUBLIC_URL%" /> That should do the trick of serving from subdirectories. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
With a baseUrl like
"test"
i expect the script path to be like:<script type="module" src="test/dist/index.js">
, but it's still just/dist/index.js
, which breaks everything if the app is in a subdirectory (e.g.https://app.com/test
)Beta Was this translation helpful? Give feedback.
All reactions