Skip to content

Commit

Permalink
chore: pretty react tweet vite config (#548)
Browse files Browse the repository at this point in the history
* init

* failing test

* Revert "failing test"

This reverts commit daa9b1d.

* remove react client
  • Loading branch information
Aslemammad authored Feb 29, 2024
1 parent 6fea996 commit 47846fe
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions examples/14_react-tweet/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
/** @type {import('vite').UserConfig} */
export default ({ mode }: { mode: string }) => ({
...(mode === 'development' && {
optimizeDeps: {
include: [
'react-dom/client',
'react-tweet > use-sync-external-store/shim/index.js',
'react-tweet > date-fns/format/index.js',
],
},
ssr: {
noExternal: ['react-tweet'],
},
}),
});
export default ({ mode }: { mode: string }) => {
if (mode === 'development') {
return {
optimizeDeps: {
include: [
'react-tweet > use-sync-external-store/shim/index.js',
'react-tweet > date-fns/format/index.js',
],
},
ssr: {
noExternal: ['react-tweet'],
},
};
}
return {};
};

0 comments on commit 47846fe

Please sign in to comment.