-
Notifications
You must be signed in to change notification settings - Fork 116
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
Don't export PrimerMultiInputElement #1731
Conversation
🦋 Changeset detectedLatest commit: 9dade03 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Is there some kinda linting we could introduce to avoid this in the future? |
Just popping in here to say that this time I actually need to reference the |
Thank you for explaining. I had the chance to investigate another way to use the library as an npm and seems to work properly. Instead of using diff --git a/app/javascript/application.js b/app/javascript/application.js
index 524536c..c4f2aa4 100644
--- a/app/javascript/application.js
+++ b/app/javascript/application.js
@@ -1,3 +1,3 @@
import '@hotwired/turbo-rails';
-import '@primer/view-components';
+import '@primer/view-components/app/assets/javascripts/primer_view_components.js';
import './stimulus.js'; Removing the diff --git a/package.json b/package.json
index 5e8086f7..4ad29a34 100644
--- a/package.json
+++ b/package.json
@@ -3,7 +3,6 @@
"version": "0.0.116",
"description": "ViewComponents for the Primer Design System",
"main": "app/assets/javascripts/primer_view_components.js",
- "module": "app/components/primer/primer.js",
"types": "app/components/primer/primer.d.ts",
"repository": "primer/view_components",
"keywords": [ |
Thank you for your support, I'm going to close the issue since importing the full path seems to work properly. |
Use the full import path in documentation as recommended in the PR here primer#1731 (comment) to avoid `Uncaught DOMException` errors around double registration of web components.
I've opened a PR with an update to the install documentation as I spent a while chasing this one down. |
Exporting a component can cause errors when used as an npm package. Please see #1560
/cc @jonrohan