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

Fix package exports #251

Merged
merged 4 commits into from
Oct 3, 2022
Merged

Fix package exports #251

merged 4 commits into from
Oct 3, 2022

Conversation

alexanderhorner
Copy link
Contributor

The new exports:

"./css": "./dist/vue-stripe-menu.css",
"./scss": "./src/scss/index.scss"

So for <script>:

import 'vue-stripe-menu/css'

import 'vue-stripe-menu/scss'

or <style>:

@import 'vue-stripe-menu/css';

@import 'vue-stripe-menu/scss';

@netlify
Copy link

netlify bot commented Oct 3, 2022

Deploy Preview for vue-stripe-menu ready!

Name Link
🔨 Latest commit 55dc0c0
🔍 Latest deploy log https://app.netlify.com/sites/vue-stripe-menu/deploys/633b38c86fa7810008055404
😎 Deploy Preview https://deploy-preview-251--vue-stripe-menu.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@alexanderhorner
Copy link
Contributor Author

Fixes #250

@@ -13,7 +13,9 @@
".": {
"import": "./dist/vue-stripe-menu.es.js",
"require": "./dist/vue-stripe-menu.umd.js"
}
},
"./css": "./dist/vue-stripe-menu.css",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.

I think we should leave current import for backward compatibility.

These imports should work just as they did:

vue-stripe-menu/src/scss/index
vue-stripe-menu/dist/vue-stripe-menu.css
etc

But I don't really know what it should look like.

{
  "./dist/*": "./dist/*",
  "./src/*": "./src/*"
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the two 'legacy' exports (additionally to the new ones)

"./css": "./dist/vue-stripe-menu.css",
"./scss": "./src/scss/index.scss",
"./dist/vue-stripe-menu.css": "./dist/vue-stripe-menu.css",
"./src/scss/index": "./src/scss/index.scss"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"./dist/*": "./dist/*",
"./src/*": "./src/*"

Works too btw, but I guess it's not recommended.

@oleksiikhr oleksiikhr merged commit 00be5f1 into oleksiikhr:main Oct 3, 2022
@alexanderhorner
Copy link
Contributor Author

Forgot to change version number to 3.0.0-beta.2

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

Successfully merging this pull request may close these issues.

None yet

2 participants