-
Because vite-ssr runs rollup twice any bundle analyser would overwrite the analysis of the first run (client bundle) with the analysis of the second run (SSR bundle). So far this is the best I have come up with. plugins: [
visualizer({
get filename() {
return `dist/stats_${String(Date.now()).slice(-5)}.html`;
},
}),
], Is there a way to know which run we're in, in the config of another plugin? Any other idea? |
Beta Was this translation helpful? Give feedback.
Answered by
frandiox
Oct 15, 2021
Replies: 1 comment
-
@moeriki You can pass options only to client or server builds in the plugin: viteSSR({
build: {
clientOptions: {
plugins: []
},
serverOptions: {
plugins: []
}
}
}) If you want to visualize both, I guess you can add the plugin twice with different file output? |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
moeriki
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@moeriki You can pass options only to client or server builds in the plugin:
If you want to visualize both, I guess you can add the plugin twice with different file output?