GithubHelp home page GithubHelp logo

Comments (6)

vadxq avatar vadxq commented on June 26, 2024

@leishihong 你好,想问一下可以贴一下关于vconsole的vite配置,vite版本,插件版本和vconsole版本嘛

from vite-plugin-vconsole.

leishihong avatar leishihong commented on June 26, 2024

@vadxq

vite.config.ts 配置

viteVConsole({
entry: pathResolve('src/main.ts').replace(/\/g, '/'),
localEnabled: command === 'serve',
enabled: command !== 'serve' || mode === 'test',
config: {
maxLogNumber: 1000,
theme: "dark",
},
}),

"vconsole": "^3.12.0",

"vite": "^2.7.2",

"vite-plugin-vconsole": "^1.1.1",

没有在main.ts 中引入vconsole 引入以后就报错了

from vite-plugin-vconsole.

leishihong avatar leishihong commented on June 26, 2024

from vite-plugin-vconsole.

vadxq avatar vadxq commented on June 26, 2024

@leishihong
方便贴一下main.ts中关于vconsole处理的代码嘛?
另:在main.ts可以不需要引入vconsole,配置里配置开启就可以看到vconsole了。entry配置的.replace(//g, '/')这行可以不用处理了,V1.1.1+处理过这个window问题。

from vite-plugin-vconsole.

leishihong avatar leishihong commented on June 26, 2024

from vite-plugin-vconsole.

vadxq avatar vadxq commented on June 26, 2024

@leishihong 有最小可复现的代码嘛?方便在CodeSandbox/CodePen/jsFiddle等平台配一个看看嘛?
联系邮箱[email protected]

from vite-plugin-vconsole.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.