-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Scoped Styles at Runtime #873
Comments
Talked with @znck a little about this, here was the feedback:
However, in our current setup the Vue library isn't bundled together with the user's Component, so there isn't really a way to "bundle" together, and the CDN bundle versions don't work in browser.
|
Confirming that the latest release (3.0.0-alpha.10) solved this. Thank you for the quick response! |
Version
3.0.0-alpha.9
Reproduction link
https://codepen.io/shshaw/pen/7779e80cdcb31366bcaa5d403c7ed360?pg=vue
Steps to reproduce
<style scoped>
Uncaught TypeError: _withId is not a function
What is expected?
Styles will be scoped and component will render
What is actually happening?
Vue fails with a
Uncaught TypeError: _withId is not a function
error.We aren't bundling Vue and the user's code together. We currently are serving a CDN version of Vue (currently https://unpkg.com/vue@3.0.0-alpha.9/dist/vue.global.js; I tried the other versions but they have the same issue or aren't browser-ready ), then the Webpack compiled user component separately.
It's not clear if we need to do something on the Webpack side to ensure the styles are scoped there, or if this is something solely on the runtime side.
The text was updated successfully, but these errors were encountered: