rollup-plugin-serve
rollup-plugin-serve copied to clipboard
How can I serve multiple pages but with url .html removed
So rollup config looks like this:
htmlTemplate({
template: 'src/index.html',
target: 'index.html'
}),
htmlTemplate({
template: 'src/learn.html',
target: 'learn.html'
}),
an inside index.html
I have this link:
<a href="/learn"/>
when navigated to this link:
It doesn't pickup learn.html
which is the behaviour I want.
I don't want to put .html
in the url bar.
Try rollup-plugin-dev instead.
Take a look at the historyApiFallback
option