alwaysonlinetxm / rollup-plugin-fill-html

fill the html template with the bundle js..
MIT License
17 stars 14 forks source link

Absolute path for SPAs #12

Open sporto opened 6 years ago

sporto commented 6 years ago

The plugin will add the bundle like src="app.js".

But I'm building a single page application, where refreshing the browser at any path will always server the same page. E.g. /a/b/c always serves the same index.html.

Because the path is relative app.js. The page cannot find the bundle. Could you add a config option to add this as absolute path? e.g. /app.js

sporto commented 6 years ago

Looks like adding a <base href="/" /> in head might be enough.