Vite 6 support #160
-
Is Vite 6.x supported in this plugin? There is a peer dependency on Vite 5.x. If it is supported, can we have the peer dependency updated? https://github.com/DataDog/build-plugins/blob/master/packages/published/vite-plugin/package.json#L83 |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Thanks a ton for the heads-up! I was off for the past two weeks, I'll check this out asap. Let me know if you were able to already test this with Vite 6.x on your side. I'll keep this discussion updated with my work. |
Beta Was this translation helpful? Give feedback.
-
I am still in the process of integrating the plugin - was slow walking it while waiting for an answer - but aside from a peer dependency error when installed, I haven't noticed any crashing/errors when running with One thing I did have to do was add a custom plugin to correct the context return defineConfig({
build: {
sourcemap: true,
outDir: path.resolve(__dirname, 'dist'),
rollupOptions: {
input: {
main: path.resolve(__dirname, 'index.html')
}
}
},
plugins: [
datadogVitePlugin({
errorTracking: {
sourcemaps: {
dryRun: true,
minifiedPathPrefix: '/',
releaseVersion: packageJson.version,
service: packageJson.name }
},
customPlugins({ context }) {
// mutate the bundler outDir to match the vite build outDir, otherwise datadogVitePlugin cannot find
// the built code and source maps (it is lacking the '/dist' in the path)
context.bundler.outDir = path.resolve(__dirname, 'dist');
return [];
}
}),
react(),
tailwindcss()
],
root: path.resolve(__dirname)
}); example errors (missing
|
Beta Was this translation helpful? Give feedback.
-
I opened #162 to upgrade vite to 6. I'll have a better look at this |
Beta Was this translation helpful? Give feedback.
-
These should be fixed in Both Vite 6 support and the I'll close this for now, feel free to re-open if you have any issue with this. |
Beta Was this translation helpful? Give feedback.
These should be fixed in
v2.5.3
.Both Vite 6 support and the
outDir
issue you had @cschwebk.I'll close this for now, feel free to re-open if you have any issue with this.