-
Notifications
You must be signed in to change notification settings - Fork 454
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: nuxt module [SFUI2-1327] #3155
Conversation
🦋 Changeset detectedLatest commit: 95f5f84 The changes in this PR will be included in the next version bump. 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 |
import * as storefrontUi from '@storefront-ui/vue'; | ||
import { tailwindConfig } from '@storefront-ui/vue/tailwind-config'; | ||
import { type RawFile } from 'tailwindcss/types/config'; | ||
import '@nuxtjs/tailwindcss'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
without this import NuxtOptions['tailwindcss']
does not work and throw error that tailwindcss
does not exists on NuxtOptions
, because there is typing file generated on tailwindcss side that NuxtOptions
contain this property.
7edda5f
to
4aed9de
Compare
4aed9de
to
2b21954
Compare
429f4df
to
16d0405
Compare
b95c197
to
237404f
Compare
cannot continue working with PR because of error occurs nuxt/module-builder#267 |
237404f
to
c5a1e9e
Compare
|
||
```bash | ||
# npm | ||
npm i -D @nuxtjs/tailwindcss @storefront-ui/vue | ||
npm i -D @storefront-ui/nuxt @storefront-ui/vue @nuxtjs/tailwindcss |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: shouldn't @nuxtjs/tailwindcss
be installed by our nuxt module?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its installed only in nuxt itself modules
property in config, however we still need dependency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dependency in our package.json, right? Not in the user codebase.
Like: @nuxtjs/tailwindcss
does not require you to install tailwindcss
itself
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dependency in client package.json. If user will install our @storefront-ui/nuxt
module, which uses @nuxtjs/tailwindcss
wont have it wont work. In other words await installModule('@nuxtjs/tailwindcss');
in out module just adding @nuxtjs/tailwindcss
string to nuxt.config.js
modules
property. It does not installing dependency into package.json. I just double checked it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's why it would be good to have @nuxtjs/tailwindcss
as a subdependency of our module, right? IMO it would be a nice thing for the end users - they do not have to install/update @nuxtjs/tailwindcss
unless they use it directly by themselves.
Now I'm wondering if we shouldn't do the same for @storefront-ui/vue
. Do we need it to be explicitly installed by the user and not as a subdependency of @storefront-ui/nuxt
?
264716c
to
de417f0
Compare
de417f0
to
a56eeb9
Compare
ef5c503
to
07f894e
Compare
57d7878
to
c30a56b
Compare
c30a56b
to
72117ed
Compare
Related issue
https://alokai.atlassian.net/browse/SFUI2-1327
Closes #
Scope of work
Fix
nuxt
packageAdd
README.md
fileUpdate installation documentation
Add linting to
nuxt
packageScreenshots of visual changes
Checklist