-
Notifications
You must be signed in to change notification settings - Fork 22
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
nuxt3: resolver.resolveModule is not a function #190
Comments
Same issue, any help will be helpful |
yep same issue |
Any updates here? Got stuck at the same point. |
same here! |
same here |
With Nuxt 3 this module still is not supported. Use the
Source: https://vite.nuxtjs.org/misc/common-issues#styleresources |
@designbydc Thanks, it works. |
For anyone using webpack with Nuxt 3 or Nuxt Bridge, I was able to modify the plugin to use @nuxt/kit. I don't have the bandwidth to formalize this as a pull request, but I did make a gist with some directions on how to install it. The good news is that I was able to test it using both Nuxt 3 and Nuxt Bridge and everything appears to work without a hitch. https://gist.github.com/volkipp/56655a3743bd7ebab57a6666833f3ec2 With a little effort you should also be able to make this module add to the vite preprocessorOptions as well. Hopefully someone here can use this as a foundation to make a formal merge request. Cheers! 🍻 |
I had the same issue. // src/assets/styles/mq.scss
@use '~sass-mq' as *;
// or, @use '../../../node_modules/sass-mq' as *;
// I tried both, but neither of them successed. // nuxt.config.ts
modules: [
'@/modules/style-resources'
],
styleResources: {
scss: ['assets/styles/mq.scss']
} // src/pages/index.vue
.hoge {
@include mq($from mobile) {/* */}
} It says |
I was just stupid. - additionalData: '@import "@/assets/scss/global.scss";',
+ additionalData: '@use "path/to/file.scss" as *;', |
|
I have created a |
Will track Nuxt 3 support here #213 :) |
Thanks for this module. It makes life so much easier! I tried to use it in with nuxt3 beta, but (as expected) it's not working out of the box. Is there a plan to make this module nuxt3 ready? Thanks!
Here's what I get when using it with sass and sass-loader:
Fresh nuxt3 beta install (3.0.0-27235451.ece0e01)
Mac OSX
Node: v14.17.6
yarn dev -o
Cannot start nuxt: resolver.resolveModule is not a function
at node_modules/@nuxtjs/style-resources/lib/module.js:35:43
at Array.reduce ()
at node_modules/@nuxtjs/style-resources/lib/module.js:34:42
at Array.reduce ()
at retrieveStyleArrays (node_modules/@nuxtjs/style-resources/lib/module.js:32:25)
at Object.nuxtStyledResources (node_modules/@nuxtjs/style-resources/lib/module.js:50:60)
at installModule (node_modules/@nuxt/kit/dist/index.mjs:1196:17)
at initNuxt (node_modules/nuxt3/dist/index.mjs:817:11)
at async load (node_modules/nuxi/dist/chunks/dev.mjs:6763:9)
at async Object.invoke (node_modules/nuxi/dist/chunks/dev.mjs:6794:5)
✔ Generated nuxt.d.ts
The text was updated successfully, but these errors were encountered: