-
Notifications
You must be signed in to change notification settings - Fork 507
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
External dependencies are not bundled in the UMD build #179
Comments
We are facing similar issue: |
I think this should get fixed by #183 by creating a tsdx.config.js // tsdx.config.js
module.exports = {
rollup(config, options) {
config.external = (id) => false;
return config;
}
} |
I'll test when 0.9.0 is released |
Hi there, what was the status on this after this release to 0.9.0? |
@luisrudge did you get a chance to test anything out yet, this backs into one of my questions as well. |
@tabuckner sorry, I didn't. I changed my focus and had to let it go. sorry! |
Any solution to this? I'm also struggling with this issue. When I bundle UMD build my dependencies are not included. @azizhk solution is not working for me because it raises another error. I wonder why this is not a default behavior. If you create a lib to drop into a script tag you expect all the dependencies get included in a single file. Am I missing something? |
@jimmyn
module.exports = {
rollup(config) {
if (config.output.format === 'umd') {
delete config.external;
}
return config;
}
} What other error did you get? If this were supported internally it would basically look the same. I'm not totally sure why it's not the default behavior -- I think that's just historically adopted from I do think it could make sense to change the default as some other tools do bundle UMD by default. However, there are ways to "import" other libraries into UMD, pending your environment (UMD can be used in Node too). In the browser, you could get your dependencies from CDN to prevent duplication. |
@agilgur5 your solution works fine for me, thanks. Maybe it is worth mentioning in the documentation somewhere. |
When I use this method the console gets another prompt, 'parseRtpParameters' is not exported by 'node_modules\sdp\ SDp.js' this is my "devDependencies": { |
Current Behavior
My project has a few dependencies (
qs
,fast-text-encoding
andes-cookie
). When I build the UMD bundle, the dependencies are not bundled together with my code.Expected behavior
I expect all my dependencies to be bundled together with my code
Suggested solution(s)
Maybe it's a rollup config? I have no idea :(
Your environment
The text was updated successfully, but these errors were encountered: