vue.js - 在 Vue-Vite 中启用 sourcemaps

标签 vue.js vuejs3 vite bugsnag vitejs

是否可以在生产环境中启用 Vue-Vite 中的 sourcemaps?
我想将它用于 Bugsnag。
在文档中找不到任何关于它的信息。
In dev it just works out of the box.

最佳答案

感谢@tony19,我可以找到它:
从 vue ~2.0 开始,它的工作方式是这样的:
<projectRoot>/vite.config.js :

/**
* @type {import('vite').UserConfig}
*/
export default {
    plugins: [vue()],
    build: {
        sourcemap: true,
    },
}

关于vue.js - 在 Vue-Vite 中启用 sourcemaps,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66275174/

相关文章:

vue.js - 如何从另一个VUE组件调用方法

javascript - VuetifyJS 中的 "TypeError: _vm.$refs.dialog.save is not a function"

node.js - 如何使用库导入来编译 C 文件到 WebAssembly 文件 (Emscripten)

vue.js - 未捕获( promise )TypeError : Cannot read properties of undefined (reading 'completed' ) in Vue 3

vue.js - 类型错误 : Cannot read properties of null (reading 'isCE' ) - Custom Component Library

javascript - Vue3 : how to avoid Vitejs to erase/replace all DOM content when mounting the app?

vue.js - Vue路由器延迟加载在Vite中不起作用(错误: Unknown variable dynamic import)

javascript - 无法在 VUEJS 2 中的 Axios POST 方法中访问 "this"

vue.js - 如何在 vee-validate 中使用 <select>?

typescript - Vue.js 3和typescript:类型'ComponentPublicInstance上不存在 '$store'属性