Skip to content
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

[BUG] Module names in UMD builds do not match #2481

Closed
mhassan1 opened this issue Oct 21, 2023 · 1 comment · Fixed by #2482
Closed

[BUG] Module names in UMD builds do not match #2481

mhassan1 opened this issue Oct 21, 2023 · 1 comment · Fixed by #2482
Assignees
Labels

Comments

@mhassan1
Copy link
Contributor

Describe the bug

Each package's UMD build adds a property to self that is different than what the other packages' UMD builds expect; for example:

// in `@tsed/schema/lib/browser/schema.umd.min.js`
// e === self, t === factory
e.schema=t(e["@tsed/core"],e["change-case"])

// in `@tsed/core/lib/browser/core.umd.min.js`
// t === self, e === factory
t.core=e()

When @tsed/schema executes in a browser, it looks for self["@tsed/core"], which doesn't exist (although self.core does).

To Reproduce

  1. Use Webpack to bundle @tsed/schema
  2. Execute the bundle in a browser
  3. See an error like e.DecoratorTypes is undefined (where e is supposed to be the exports from @tsed/core)

Expected behavior

No error

Code snippets

No response

Repository URL example

No response

OS

macOS

Node version

Node v18.17.1

Library version

v7.39.0

Additional context

No response

@github-actions
Copy link

🎉 Are you happy?

If you appreciated the support, know that it is free and is carried out on personal time ;)

A support, even a little bit makes a difference for me and continues to bring you answers!

github opencollective

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants