feat(packages/tuono): config – add optimizeDeps and plugins to vite options (#197)

This commit is contained in:
Marco Pasqualetti
2024-12-08 10:44:09 +01:00
committed by GitHub
parent bcf7e5b5ab
commit c6e93c266a
12 changed files with 284 additions and 240 deletions
+2 -2
View File
@@ -8,8 +8,8 @@
"tuono": "link:../../packages/tuono"
},
"devDependencies": {
"@types/react": "^18.3.3",
"@types/react": "^18.3.13",
"@types/react-dom": "^18.3.0",
"typescript": "^5.4.5"
"typescript": "^5.6.3"
}
}
+2 -2
View File
@@ -8,8 +8,8 @@
"tuono": "link:../../packages/tuono"
},
"devDependencies": {
"@types/react": "^18.3.3",
"@types/react": "^18.3.13",
"@types/react-dom": "^18.3.0",
"typescript": "^5.4.5"
"typescript": "^5.6.3"
}
}
+5 -4
View File
@@ -3,14 +3,15 @@
"description": "Tuono example combined with mdx",
"version": "0.0.1",
"dependencies": {
"@mdx-js/react": "^3.0.1",
"@mdx-js/react": "3.1.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"tuono": "link:../../packages/tuono"
},
"devDependencies": {
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"typescript": "^5.5.3"
"@mdx-js/rollup": "3.1.0",
"@types/react": "18.3.13",
"@types/react-dom": "18.3.0",
"typescript": "^5.6.3"
}
}
+11 -1
View File
@@ -1,5 +1,15 @@
import type { TuonoConfig } from 'tuono/config'
import mdx from '@mdx-js/rollup'
const config: TuonoConfig = {}
const config: TuonoConfig = {
vite: {
optimizeDeps: {
exclude: ['@mdx-js/react'],
},
plugins: [
{ enforce: 'pre', ...mdx({ providerImportSource: '@mdx-js/react' }) },
],
},
}
export default config