-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Target "main" declares an output file path of "dist/script.js" which does not match the compiled bundle type "html". #7129
Comments
Is there a reason you specified |
Thank you!! |
Hello, |
If you do need to keep the main field, and want Parcel to ignore it, you can add |
Would it be possible to do this only by changing |
Thanks! It solves the issue. |
Thanks, this works perfectly.
|
Thank you. This was very helpful |
🐛 bug report
Parcel doesn't build your files, just throws an Error: @parcel/namer-default: Target "main" declares an output file path of "dist/script.js" which does not match the compiled bundle type "html".
🎛 Configuration (.babelrc, package.json, cli command)
🤔 Expected Behavior
Should build your files correctly into dist folder without errors
😯 Current Behavior
Throws an Error: @parcel/namer-default: Target "main" declares an output file path of "dist/script.js" which does not match the
compiled bundle type "html".
If I change main to "dist/script.html" and run build, then it asks again to change file format back to .js
💁 Possible Solution
🔦 Context
💻 Code Sample
HTML file:
JaveScript file:
console.log("hi");
🌍 Your Environment
The text was updated successfully, but these errors were encountered: