egoist / styled-vue

Use dynamic styles in Vue single-file components.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dynamic imports & Nuxt.js: Syntax Error: 'dynamicImport'

maoberlehner opened this issue · comments

This package looks awesome and I'd love to use it but it seems that it doesn't support dynamic imports. After installing it in my Nuxt.js application, I get the following error:

Syntax Error: 'dynamicImport' (26:34)                                                      friendly-errors 17:41:18

                                                                                           friendly-errors 17:41:18
 @ ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/index.vue?vue&type=script&lang=js& 11:0-74 15:22-38
 @ ./pages/index.vue?vue&type=script&lang=js&
 @ ./pages/index.vue
 @ ./.nuxt/router.js
 @ ./.nuxt/index.js
 @ ./.nuxt/client.js
 @ multi webpack-hot-middleware/client?name=client&reload=true&timeout=30000&path=/__webpack_hmr/client ./.nuxt/client.js

Am I right that this package does not work correctly when using dynamically imported components?

:tada: This issue has been resolved in version 0.1.4 :tada:

The release is available on:

Your semantic-release bot 📦🚀

Thank you for this very quick response! But unfortunately it still doesn't seem to work: https://codesandbox.io/s/monm4pw51x?module=%2Fcomponents%2FLogo.vue

Oh, I'm sorry – I forgot to add it. Sorry!
I'm like 80% sure though, that I did add it in my local project. But maybe I didn't restart webpack. Can't test it right now because I'm at work. But most likely it was my fault in my local setup too.
Thanks for the quick response again!