You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm creating a static html file generator using react-router's pre-rendering. When I build the files, I've noticed it creates all pages as an index.html within the path folders, rather than have the filename as the page name.
So for example, I have this folder structure:
src
pages
group1
page1
page1.tsx
page2
page2.tsx
group2
page1
page1.tsx
page2
page2.tsx
When I compile, it creates like this:
build
client
group1
page1
page1
index.html
page2
page2
index.html
group2
page1
page1
index.html
page2
page2
index.html
I would prefer the index.html to take on the name of the folder above (e.g. build/client/group1/page1/page1.html). Is this possible within the config?
I've also noticed that the compiled html has a load of script tags at the bottom. Is there a way of excluding these from the build?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm creating a static html file generator using react-router's pre-rendering. When I build the files, I've noticed it creates all pages as an index.html within the path folders, rather than have the filename as the page name.
So for example, I have this folder structure:
When I compile, it creates like this:
I would prefer the
index.html
to take on the name of the folder above (e.g.build/client/group1/page1/page1.html
). Is this possible within the config?I've also noticed that the compiled html has a load of script tags at the bottom. Is there a way of excluding these from the build?
Beta Was this translation helpful? Give feedback.
All reactions