1- import { defineConfig } from ' vite' ;
2- import reactRefresh from ' @vitejs/plugin-react' ;
1+ import { defineConfig } from " vite" ;
2+ import reactRefresh from " @vitejs/plugin-react" ;
33// import typescript from "rollup-plugin-typescript2";
4- import typescript from ' @rollup/plugin-typescript' ;
4+ import typescript from " @rollup/plugin-typescript" ;
55
66// https://vitejs.dev/config/
77export default defineConfig ( {
@@ -10,27 +10,27 @@ export default defineConfig({
1010 build : {
1111 // Instruct Vite to bundle this project as a library
1212 lib : {
13- entry : ' src/index.tsx' ,
14- name : ' animated-dark-mode-toggle' ,
15- formats : [ ' cjs' , 'es' ] ,
13+ entry : " src/index.tsx" ,
14+ name : " animated-dark-mode-toggle" ,
15+ formats : [ " cjs" , "es" ] ,
1616 fileName : ( format ) => `index.${ format } .js` ,
1717 } ,
1818
1919 rollupOptions : {
2020 // Don't bundle react or react-dom
21- external : [ ' react' , ' react-dom' ] ,
21+ external : [ " react" , " react-dom" ] ,
2222
2323 output : {
2424 globals : {
2525 // Globally define React for UMD builds
26- react : ' React' ,
26+ react : " React" ,
2727 } ,
2828 } ,
2929
3030 plugins : [
3131 typescript ( {
3232 // Ensure declaration files are outputted to our dist directory
33- tsconfig : ' ./tsconfig.lib.json' ,
33+ tsconfig : " ./tsconfig.lib.json" ,
3434 } ) ,
3535 ] ,
3636 } ,
0 commit comments