Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Path relative imports for app.js and vendor.js #1972

Open
SephReed opened this issue Dec 28, 2020 · 1 comment
Open

Path relative imports for app.js and vendor.js #1972

SephReed opened this issue Dec 28, 2020 · 1 comment

Comments

@SephReed
Copy link
Contributor

SephReed commented Dec 28, 2020

The templating engine replaces $bundles with root relative imports:

<script type="text/javascript" src="/app.js"></script>
<script type="text/javascript" src="/vendor.js"></script>

It should instead be path relative imports

<script type="text/javascript" src="./app.js"></script>
<script type="text/javascript" src="./vendor.js"></script>

Having not relative paths makes it so the dist only works for host root index files. Having relatives paths would work for that and every other subpath.

@vegarringdal
Copy link
Member

vegarringdal commented Dec 28, 2020

Have you tried adding publicPath option ?

    webIndex: {
      publicPath: "./",
      template: "./src/index.html",
    }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants