-
-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTML files in subfolders do not get styles / scripts. #46
Comments
Have you found any way to load style and script on subfolder. |
You will be able to organize HTML files in folders, by adding the below code
Can be done better, if we alter the actual code. |
Would be great if we could have different directories and root level pages e.g. contact.html Any idea how to change the script to do this? |
All you need to do is modify webpack.plugins.js to instead of using const filename = path.relative(config.paths.src, dir); Actually this could be updated in the repo, as it would be more versatile. Together with changing line 58 as: const generateHTMLPlugins = () => glob.sync(`./${config.paths.src}/**/*.html`).map((dir) => { which would allow the src path to be properly modified here, but that is not directly related to this issue, just saying, as once |
Describe the bug
In your documentation, it clearly states:
So I don't know if this a bug report or a feature request:
I want users to be able to visit
website.com/survey
instead ofsurvey.html
so I've put asurvey/index.html
file there. It works technically, I see the HTML, but it is not receiving any of the styles or javascript code injection.To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect to be able to nest my HTML for cleaner URLs
Desktop (please complete the following information):
Platform Agnostic
The text was updated successfully, but these errors were encountered: