-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
Placing file with .htm
extension breaks the build
#471
Comments
I'm on the fence about this one - I don't know if we should support That said, we should improve the error message for sure. It should say something like "you need at least one |
@developit in my case I have a proper If it listed the "files that are not javascript" and respective file extensions I think it’d be clearer to understand what is going on. I agree on the fractional usage, I realised the extension could be the reason quickly enough, but I also just had a few files and removing files from /public one by one proved that it was the |
Note that WMR expects the wmr/packages/nomodule-plugin/index.js Line 35 in 7e569dd
wmr/packages/wmr/src/lib/output-utils.js Line 38 in 7e569dd
|
I mentioned it to Marvin offline, but I'll echo here: I'm 100% in for landing a proper error message here, but I'm waffling on whether to support I'm the odd one out here, but if the above has convinced anyone, I think we could at least try landing the error message first - it's not just useful for folks saving |
For completeness sake copying my reasoning for adding I do quite like the appeal of having some form of single file components in the future. But I think the file name must not mess with established ones. For any word we'll chose we have to take the whole ecosystem into account. Every IDE will pick up That will become quite problematic for language servers in Editors as any custom one for our file format needs to battle the builtin one. We've seen how this plays out a few times in the history of programming. In the JavaScript-sphere flow tried to overload the The same thing happened with TypoScript, a custom domain language of the TYPO3 CMS, which is pretty popular here in Germany. It uses So yeah, I don't want to relieve those years. In my opinion overloading existing file format extensions is a huge can of worms nobody should open. It renders anything dead on arrival because fighting existing consensus, editor defaults, webserver defaults, etc is a lost cause. It's not worth it. Therefore we should support |
Describe the bug
When placing
foo/index.htm
intopublic
folder, build command produces an error.In development, this works fine – /foo/ correctly served as HTML
When running build, I get
Unexpected token (Note that you need plugins to import files that are not JavaScript)
Changing file estension from
.htm
to.html
fixes the problem.To Reproduce
Steps to reproduce the behavior:
/public
index.htm
into it with some html insidenpm run start
and navigate to/foo/
in browsernpm run build
and see error:Unexpected token (Note that you need plugins to import files that are not JavaScript)
Expected behavior
I’d expect
.htm
to behave the same way as.html
. Build successfully copiesfoo/index.html
intodist
Desktop (please complete the following information):
Additional context
Not a huge deal, but showing an error about
htm
not being supported might save time for someone.The text was updated successfully, but these errors were encountered: