Replies: 1 comment 1 reply
-
You need to somehow configure your webserver to use |
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
Uh oh!
There was an error while loading. Please reload this page.
-
I've just transferred from Webpack to Parcel and need some advice about how to organise my files. I am not using a framework, just js, css, and npm modules to create an app that runs in a web browser (no node.js). I'm developing it on a local machine, uploading the code to GitHub, then pulling it down to a sub-directory on a web server, so all links need to be relative.
The current structure of
<sub-dir>
is like this:and the CLI command I am using is
parcel build index.html --public-url .
This works, except that to run the app, the weblink has to be
http://example.com/<sub-dir>/dist/index.html
but I want it to be
http://example.com/<sub-dir>/index.html
Using webpack, the latter worked because the top level
index.html
referenced theapp.bundle.js
that Webpack had put indist/
.I thought of adding a RewriteRule in the
.htaccess
file to redirect<sub-dir>index.html
to<sub-dir>/dist/index.html
but that seems like a major hack. What is the right way of doing this?Beta Was this translation helpful? Give feedback.
All reactions