Closed funder7 closed 4 years ago
Maybe related to https://github.com/visualfanatic/svg-to-vue/issues/19
Yes, I can confirm that: downgrading svg-to-vue from 0.7.0 to 0.6.0 resolved all warnings, and made the application work again.
I missed some posts, sorry :)
Maybe this should be re-opened? I think I just got the same error.
During compilation:
WARNING Compiled with 1 warnings 7:00:10 PM
warning in ./static/js/cite-grid/main.vue?vue&type=script&lang=js&
"export 'default' (imported as 'USMap') was not found in '../../../capweb/templates/includes/usa_territories_white.svg'
During page display:
usa_territories_white.svg?376f:2 Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
at Module.eval (usa_territories_white.svg?376f:2)
at eval (usa_territories_white.svg:620)
at Module../capweb/templates/includes/usa_territories_white.svg (cite-grid.js:4868)
at __webpack_require__ (cite-grid.js:782)
at fn (cite-grid.js:150)
at eval (cjs.js?!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js?!../node_modules/vue-loader/lib/index.js?!./static/js/cite-grid/main.vue?vue&type=script&lang=js&:18)
at Module.../node_modules/cache-loader/dist/cjs.js?!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js?!../node_modules/vue-loader/lib/index.js?!./static/js/cite-grid/main.vue?vue&type=script&lang=js& (cite-grid.js:4418)
at __webpack_require__ (cite-grid.js:782)
at fn (cite-grid.js:150)
at eval (main.vue?8074:1)
As a workaround, forcing yarn to use an earlier version of svg-to-vue avoided the issue:
"resolutions": {
"vue-svg-loader/svg-to-vue": "0.6.0"
},
Hello, I'm sorry if my report is not complete but I'm a bit out of time now.
Today I did upgrade all outdated libraries in my project, including vue-svg-loader (from 0.15.0 to 0.16.0). After the update, the build completed with a warning for each one of the vue components generated by the loader, here is the webpack output for one of them:
Even if this is only a warning, when I load my vue application, then I receive this message in the console:
TypeError: "exports" is read-only
I wasn't sure if that was releated to vue-svg-loader or other libraries update (or both).
Anyway, after downgrading to previous version, warnings disappeared and the application loaded correctly.
Thanks for this library ;)