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

/register in uniforms-bridge-simple-schema-2 gets tree shaken #888

Closed
macrozone opened this issue Feb 26, 2021 · 3 comments
Closed

/register in uniforms-bridge-simple-schema-2 gets tree shaken #888

macrozone opened this issue Feb 26, 2021 · 3 comments
Assignees
Labels
Type: Bug Bug reports and their fixes
Milestone

Comments

@macrozone
Copy link
Contributor

I saw that sideEffects is configured in the package.json, so that /register is not tree-shaken, but i think we additionaly need to include index.js as well to the side effects as it seems that register is not executed.

macrozone added a commit to macrozone/uniforms that referenced this issue Feb 26, 2021
@mariusrak
Copy link
Contributor

I have this issue too.
It is related to #843
I get an error

Invalid definition for name field: "uniforms" is not a supported property

@macrozone
Copy link
Contributor Author

@mariusrak you can apply this patch:

diff --git a/node_modules/uniforms-bridge-simple-schema-2/package.json b/node_modules/uniforms-bridge-simple-schema-2/package.json
index 61cf65b..e6c1a9d 100644
--- a/node_modules/uniforms-bridge-simple-schema-2/package.json
+++ b/node_modules/uniforms-bridge-simple-schema-2/package.json
@@ -7,7 +7,10 @@
   "sideEffects": [
     "es5/register.js",
     "es6/register.js",
-    "src/register.ts"
+    "src/register.ts",
+    "es5/index.js",
+    "es6/index.js",
+    "src/index.ts"
   ],
   "description": "SimpleSchema 2 bridge for uniforms.",
   "repository": "https://github.com/vazco/uniforms/tree/master/packages/uniforms-bridge-simple-schema-2",

you can use https://www.npmjs.com/package/patch-package to apply it until its released

@radekmie radekmie self-assigned this Mar 8, 2021
@radekmie radekmie added the Type: Bug Bug reports and their fixes label Mar 8, 2021
@radekmie radekmie added this to the v3.2 milestone Mar 8, 2021
@radekmie
Copy link
Contributor

radekmie commented Mar 8, 2021

Hi @macrozone and @mariusrak and thanks for the report. Well, I joked in #870 (comment) that we'll test on production and so we did 😐 Anyway, I'll prepare a fix soon and we'll release it tomorrow or on Wednesday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Bug reports and their fixes
Projects
Archived in project
Development

No branches or pull requests

3 participants