-
Notifications
You must be signed in to change notification settings - Fork 86
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
Invalid Component definition #1
Comments
It seems like it could be an issue with the SVG icon itself – is there a specific way to export it? |
I'm super glad that somebody beside me is using this package! Could you share the SVG file you are trying to use? |
Sure!
|
I also found this: tcoopman/image-webpack-loader#14 I’m using the vue-cli to generate the webpack config – if that helps. |
Okay, I see the problem, just remove |
yay! |
thank you :) |
Also, i had my .svg in assets/icons folder, I think moving them to assets/img and I think that helped too. Thanks again – this is a life saver. |
Precompile templates into render functions
It's not working to me, I needed a different approach in the last vue/webpack versions. Add the following into vue.config.js:
|
@19WAS85 Vue CLI by default uses module.exports = {
chainWebpack: config => {
config.module
.rule('svg')
.use('file-loader')
.loader('vue-svg-loader')
}
} |
Hi! Thanks for putting this together :)
I’m getting a
Invalid Component definition:
error when trying to load in an SVG.This is how I’ve set it up in the component:
This is the webpack 1.x config loaders:
Does the SVG need to be set up a certain way? Let me know if you need anything else to help debug.
Thanks again!
The text was updated successfully, but these errors were encountered: