[Fix] Export separate CSS file in Vue SDK #131
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
In an attempt to make it easier to use the Vue SDK, we inlined the import of css files used in the SDK so an extra import was not required.
This kind of worked, but has consistently caused problems on Nuxt:
This PR removes the CSS inlining in favor of exporting a CSS file to be imported. This allows the package to be used in Vue environments without a build step (browser usage) as well as without framework specific workarounds. Requiring the CSS import is also consistent with what existing Vue component libraries ask you to do and so is not an unreasonable change, ref: Quasar, FloatingVue, PrimeVue
Changes
components/style.css
export to the Vue SDK. This file contains the styles necessary to correctly render the exported components and as such must be imported when a Vue component the SDK provides is used.