Closed antonbrams closed 2 years ago
ah my bad... this was a simple mistake in index.html... for some reason the path to static bundles stop working if i'm using second level urls
<link rel="stylesheet" href="/global.css" />
<link rel="stylesheet" href="build/bundle.css" />
<script defer src="build/bundle.js"></script>
i've just simply added slashes in front of build like this
<link rel="stylesheet" href="/global.css" />
<link rel="stylesheet" href="/build/bundle.css" />
<script defer src="/build/bundle.js"></script>
and it fixed my problem!
i serve my svelte single page application with express. As long as i try following:
and go to "localhost:3000" it outputs "root", and go to "localhost:3000/test" it outputs "test", and go to "localhost:3000/test/2" it displays a blank image and an error in the console
SyntaxError: Unexpected token '<'
i've tried to launch the bundle with a sirv --single, same result:
and go to "localhost:3000" it outputs "root",
and go to "localhost:3000/test" it outputs "test",
and go to "localhost:3000/test/2" instead of syntax error, i get 404 on bundle.css and bundle.js
same thing happens if i try to create second level urls like "localhost:3000/test/second"
what i might do wrong?
client package.json
rollup config