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

使用 vite+vue3 创建的模板,安装 vite-svg-loader 后编译报错 #5207

Open
tianzhich opened this issue Oct 29, 2024 · 0 comments
Open

Comments

@tianzhich
Copy link

tianzhich commented Oct 29, 2024

"createStaticVNode" is not exported by "node_modules/@dcloudio/uni-mp-vue/dist/vue.runtime.esm.js"
Code 2024-10-29 15 06 29

vite.config.ts

import { defineConfig } from "vite";
import uni from "@dcloudio/vite-plugin-uni";
import { resolve } from "path";
import svgLoader from 'vite-svg-loader'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    uni(),
    svgLoader({
      defaultImport: "component",
      svgoConfig: {
        plugins: [
          { name: "cleanupIds", params: { remove: false, minify: false } },
        ],
      },
    }),
  ],
  resolve: {
    alias: {
      "~": resolve(__dirname, "src"),
    },
  },
});
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

No branches or pull requests

1 participant