rollup-plugin-serve icon indicating copy to clipboard operation
rollup-plugin-serve copied to clipboard

How can I serve multiple pages but with url .html removed

Open eguneys opened this issue 2 years ago • 2 comments

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.

eguneys avatar Mar 17 '22 02:03 eguneys

Try rollup-plugin-dev instead.

simonpai avatar Sep 01 '22 03:09 simonpai

Take a look at the historyApiFallback option

MendyBerger avatar Mar 16 '23 15:03 MendyBerger