-
Notifications
You must be signed in to change notification settings - Fork 693
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
Serve other static index.html
and assets on subpath(s)?
#757
Comments
I have the same issue. |
Even if you will directly run |
... do you mean |
No, I mean, if you directly serve an |
fwiw, all the docs and examples show serving folders, not a single $ serve my-app/path/to/some/index.html ... but I would expect this to work (and in my experience it does 🤷🏻) $ serve my-app/path/to/some |
@chris-dura - I do not want to serve folders in any way. I only need to serve single files:
And so on. These files have assets which cannot be loaded due to |
@yairEO -- Right, there's nothing in the docs that indicate serving single files like that would be supported. I understand if there's a reason you can't do this, but if you change them to
... then this would work out-of-the-box with no extra configuration ...
You might also be able to configure some redirects/rewrites in |
I cannot change them to I am using |
I have the same issue. |
Suggestion: Add singleFile option and use it to rewrite destination. config.rewrites = [
{
source: '**',
destination: args['--singleFile'],
},
...existingRewrites,
]; (The above code is pseudocode, so it might not work) Lines 78 to 90 in c8b7436
|
Temporary solution: Write a
directory structure:
serve.json:
|
Description
I basically have 3 "apps", each are "static" bundles with their own relative assets.
When I run
serve -l 5280 my-app
, I can browse tohttp://localhost:5280
and it servesmy-app/index.html
and themy-app.js
just fine.However, when I type
http://localhost:5280/app2
in the address bar, theapp2/index.html
loads, but I get a 404 onapp2.js
:/Library version
v14.2.0
Node version
v16.17.0
The text was updated successfully, but these errors were encountered: