-
-
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
The "global" output format is not supported in the "browser" target #7080
Comments
Please choose a different name than "browser". That one is meant for libraries: https://parceljs.org/features/targets/#library-targets |
I've done more tests and it looks like the solution could be changing config to something like this: {
"targets": {
"bootstrap": {
"engines": {
"browsers": "> 0.2%, not dead"
},
"includeNodeModules": true,
"outputFormat": "global"
}
}
} But then I can't control the name of the output file... It's always index.js file. Sometimes I love Parcel and sometimes I hate it. I didn't change anything and now our entire project doesn't build... |
Do this: {
"bootstrap": "my-dist/output.js"
"targets": {
"bootstrap": {
"engines": {
"browsers": "> 0.2%, not dead"
},
"includeNodeModules": true,
"outputFormat": "global"
}
}
} |
It looks like I can still control the name with this: {
"bootstrap": "dist/bootstrap.js",
"targets": {
"bootstrap": {
"engines": {
"browsers": "> 0.2%, not dead"
},
"includeNodeModules": true,
"outputFormat": "global"
},
"controller": {}
}
} Would be great if docs mention it at all |
🐛 bug report
I guess it's related to 2.0.0 release but I've just tried to deploy the same app without changing anything today and it stopped working with the error:
@parcel/core: The "global" output format is not supported in the "browser" target.
. This format was supported and should be supported for the browser target.🎛 Configuration (.babelrc, package.json, cli command)
🌍 Your Environment
The text was updated successfully, but these errors were encountered: