I have 2 html files index.html and popup.html using the same javascript file.
I am trying to set publicUrl to "./" for both html files but I can not seem to do it without creating a subfolder in the dist folder.
Here is my parcel command :
parcel watch src/index.html src/popup.html
Here is my targets :
"targets": {
"default": {
"publicUrl": "./"
}
},
Right now it is creating a default subfolder in the dist folder, which I would like to prevent. I would like index.html and popup.html in the dist folder.
I tried playing with targets configuration but can not achieve this.
| Software | Version(s) |
| ---------------- | ---------- |
| Parcel | 2.0.0-alpha.3.2
| Node | 10.16.0
| npm/Yarn | 1.21.1
| Operating System | macOS
This works:
"targets": {
"": {
"publicUrl": "./"
}
}
The CLI flag from 1.x seemed better for this simple case
@gpoitch
I would call that a bug, but
parcel build --public-url ./ works for Parcel 2 as well.
@mischnic the cli flag isn't working for me:
error: unknown option `--public-url'
(2.0.0-alpha.3.2)
We really need to release a new alpha.... only in yarn add parcel@nightly for now...
Most helpful comment
@mischnic the cli flag isn't working for me:
error: unknown option `--public-url'(2.0.0-alpha.3.2)