Replies: 2 comments 1 reply
-
I think you need to pipe the build through the vite vue plugin prior to import { defineConfig } from 'vite'
import { crx } from '@crxjs/vite-plugin'
import manifest from './manifest.json'
// add plugin-vue
import vue from '@vitejs/plugin-vue'
export default defineConfig({
plugins: [
// call it first before any other plugins so that all of your Vue and TS code gets compiled
vue(),
crx({ manifest }),
]
}) |
Beta Was this translation helpful? Give feedback.
1 reply
-
I've added inline sourcemap support for content scripts in #701 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I just started using Vite and the plugin, so forgive me for any ignorance.
My project is written in Typescript.
When running the dev server with
npx vite
, the sourcemaps reported by devtools always seem to be lower than the actual line numbers of the source files. Looking at the sourcemaps, it seems all typescript related code is stripped from the source map leading to this effect.So:
Would turn into:
Which would move the
console.log
to line 1 in the sourcemap instead of line 5.tsconfig.json
vite.config.ts
Have I misconfigured or is this an issue to be reported here or upstream? Thanks in advance :)
Beta Was this translation helpful? Give feedback.
All reactions