-
Notifications
You must be signed in to change notification settings - Fork 206
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
Error: Cannot find moudle "vue-awesome/components/Icon" in TypeScript template #135
Comments
Also experiencing this. |
I'm not familiar with TypeScript but according to their docs, you may try to specify something like: "files": {
"node_modules/vue-awesome"
} |
Unfortunately it doesn't work. I also tried the includes section. "node_modules/vue-awesome"
"node_modules/vue-awesome/components/Icon.vue"
"node_modules/vue-awesome/dist/vue-awesome.js" //resulted in "Maximum call stack size exceeded
error"
The strange thing is that with the local dev server it is working despite the displayed error. However If I want to build the dist it fails without producing the result. |
this is kind of strange, I swapped from No need to change So this postfix is the only tiny thing needed for the plugin to work with TS. |
Also getting this problem and I couldn't find a seamless solution to it. I had to import the Icon component using |
@paolobarbolini See @Vad1mo's comment above. |
Well. This is at least something, but you have no fun with the component, if you have no Icons for it. I'm currently failing when I try to import icon with an |
@YannikSc So are you importing the icon in an ES module or CommonJS module? |
It seems like neither of them.. I created a Nuxt plugin ( But maybe this is a topic for a separate issue? |
I had same issue. I'm trying to move the import out of a Nuxt plugin into an individual Vue component to reduce bundle sizes for icons which are rarely used. This looks promising to me:
i.e. don't try to do this inside the SSR. But I think that only works if you do the import inside the page, rather than any components below it. This makes it awkward, because there's no easy way to keep track of all the icons which are used in the component tree below the page. I've not found a way (yet) of importing into a component file. Or playing the async import trick. |
Hi,
firstly thank you very much for your great work.
I'm new to the Vue world, so I'm not sure if it's a real issue or I'm missing something trivial. I aplogize in advance.
I've set the traspileDependency in vue.config.js as per READ.ME ( I'm using vue-cli 3)
and I'm able to correctly import and use the icons in components where the script language is plain ES6 javascript, but when I try to import the component in a TypeScript block (like this
) the build fails with the error mentioned in the title.
I suspect it depends on the tsconfig.json file which somehow overrides the traspileDependency option in vue.config.js (
)
How can I address this issue?
Thank you very much
The text was updated successfully, but these errors were encountered: