@quasar-vite-plugin, when importing dependencies that wrap quasar components, it cannot handle quasar imports containing special characters #17954
Labels
area/plugins
bug/1-hard-to-reproduce
A reproduction is available, but it's hard to reproduce, so it has a lower priority.
bug/1-repro-available
A reproduction is available and needs to be confirmed.
flavour/quasar-cli-vite
kind/bug 🐞
Qv2 🔝
Quasar v2 issues
What happened?
I used quasar to package my own component library for unified style, but two copies of quasar code appeared after packaging because the import quasar of my component library was not processed correctly. The production mode package used the quasar-client.js file, for example, import { QBtn as $ } from "Quasar", $ was not processed correctly by the regular expression
What did you expect to happen?
perfecting regular expressions
Reproduction URL
https://github.com/quasarframework/quasar/blob/dev/vite-plugin/src/js-transform.js
How to reproduce?
const importQuasarRegex = /import\s*{([\w,\s]+)}\sfrom\s(['"])quasar\2;?/g;
code =
import { QBtn as $B } from "quasar";
;code2 =
import { QBtn } from "quasar"
;code.replace(importQuasarRegex, (, match) => console.log(
code
, match));code2.replace(importQuasarRegex, (, match) => console.log(
code2
, match));Flavour
Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)
Areas
Plugins (quasar)
Platforms/Browsers
No response
Quasar info output
Relevant log output
Additional context
No response
The text was updated successfully, but these errors were encountered: