Choose one: 馃悰 bug report
{
"name": "sample",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"dev": "parcel src/index.html -p 8080 --open",
"build": "parcel build src/index.html"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"autoprefixer": "^8.4.1",
"babel-cli": "^6.26.0",
"babel-preset-env": "^1.6.1",
"css-mqpacker": "^6.0.2",
"jquery": "^3.3.1",
"node-sass": "^4.9.0",
"parcel-bundler": "^1.7.1",
"parcel-plugin-bundle-manifest": "^0.1.1",
"postcss": "^6.0.22",
"swiper": "^4.2.2"
},
"description": ""
}
When I build the site, the paths are correct except that there is a"/" at the beginning, which refers to the root of my computer.
Example: /page.html instead of page.html only
It adds the / at the beginning of my links (css, js, etc...). Which is broke my website.
Be able to remove the / at the beginning of the access roads.
I tried to compile my site with the command parcel build src/index.html.
| Software | Version(s) |
| ---------------- | ---------- |
| Parcel | 1.7.1
| Node | v10.0.0
| npm/Yarn | 5.6.0
| Operating System | macOS 10.13.4 (17E202)
use the following command:
parcel build src/index.html --public-url ./
The default is /, therefore absolute paths
It works! Thanks :)
Most helpful comment
use the following command:
parcel build src/index.html --public-url ./The default is
/, therefore absolute paths