babel-plugin-transform-imports v2 and quasar
-
I’ve upgraded to
babel-plugin-transform-imports
v2 and got some errors like:imports.js?ce64:168 Uncaught Error: Unknown import from Quasar: function Vue (options) {
Reason: https://www.npmjs.com/package/babel-plugin-transform-imports#version-20-breaking-changes
Solution: Slightly changed babel config:
module.exports = { "presets": [ "@vue/app" ], "plugins": [ [ "transform-imports", { "quasar": { "transform": require('quasar/dist/babel-transforms/imports.js'), "preventFullImport": true } } ] ] }
Notice the
require()
. Hope this helps anyone -
thats good
-
@Psi
it returns now:Unknown import from Quasar: function () {
if (!called) {
called = true;
fn.apply(this, arguments);
}
}" -
This post is deleted!