Skip to content
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

dynamic require css is not success #49

Closed
zhao-yi-fan opened this issue May 8, 2024 · 0 comments · Fixed by #60
Closed

dynamic require css is not success #49

zhao-yi-fan opened this issue May 8, 2024 · 0 comments · Fixed by #60

Comments

@zhao-yi-fan
Copy link

zhao-yi-fan commented May 8, 2024

I want to dynamically load the components in the vant component library, But loading css styles is problematic

  "dependencies": {
    "@vitejs/plugin-vue2": "^2.3.1",
    "vant": "^2.13.2",
    "vite-plugin-commonjs": "^0.10.1",
    "vue": "^2.7.16"
  },
  "devDependencies": {
    "vite": "^4.5.3"
  }

Example
https://stackblitz.com/edit/vitejs-vite-k49src?file=src%2Fmain.js

Uncaught SyntaxError: Unexpected identifier '__matchRequireRuntime0__' (at App.vue:55:46)

And finding the "vant/lib/utils/dom/style" path is also problematic

image

@yejimeiming yejimeiming mentioned this issue Sep 16, 2024
@yejimeiming yejimeiming linked a pull request Sep 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant