Last active
March 7, 2025 13:24
-
-
Save ivanbarlog/a988beeb198b73a51b5c81ca2fbe5203 to your computer and use it in GitHub Desktop.
RR7 + vite + editorjs => umd?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "@editorjs/editorjs": "^2.30.7", | |
| "@react-router/node": "^7.2.0", | |
| "@react-router/serve": "^7.2.0", | |
| "editorjs-html": "^3.4.3", | |
| "react": "^19.0.0", | |
| "react-dom": "^19.0.0", | |
| "react-router": "^7.2.0", | |
| "react-router-aws": "^2.0.0-beta.2", | |
| "typescript": "^5.7.3", | |
| "vite": "^6.1.1", | |
| "vite-tsconfig-paths": "^5.1.4" | |
| "@react-router/dev": "^7.2.0", | |
| "@types/node": "^22.13.5", | |
| "@types/react": "^19.0.10", | |
| "@types/react-dom": "^19.0.4", | |
| "react-router-devtools": "^1.1.5", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| "include": [ | |
| "**/*", | |
| "**/.server/**/*", | |
| "**/.client/**/*", | |
| ".react-router/types/**/*" | |
| ], | |
| "exclude": ["cdk.out", "node_modules", "build"], | |
| "compilerOptions": { | |
| "lib": ["DOM", "DOM.Iterable", "ES2022"], | |
| "types": ["node", "vite/client"], | |
| "target": "ES2022", | |
| "module": "ES2022", | |
| "moduleResolution": "bundler", | |
| "jsx": "react-jsx", | |
| "rootDirs": [".", "./.react-router/types"], | |
| "baseUrl": ".", | |
| "paths": { | |
| "~/*": ["./app/*"] | |
| }, | |
| "esModuleInterop": true, | |
| "verbatimModuleSyntax": true, | |
| "noEmit": true, | |
| "resolveJsonModule": true, | |
| "skipLibCheck": true, | |
| "strict": true | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { reactRouter } from "@react-router/dev/vite"; | |
| import { defineConfig } from "vite"; | |
| import tsconfigPaths from "vite-tsconfig-paths"; | |
| export default defineConfig(({ command }) => { | |
| return { | |
| plugins: [ | |
| reactRouter(), | |
| tsconfigPaths(), | |
| { | |
| name: "react-router-apigatewayv2-adapter", | |
| apply(_config, env): boolean { | |
| return env.command === "build" && env?.isSsrBuild === true; | |
| }, | |
| config: async () => { | |
| return { | |
| build: { | |
| ssr: true, | |
| rollupOptions: { | |
| input: { index: "handler.ts" }, | |
| output: { | |
| entryFileNames: "[name].mjs", | |
| chunkFileNames: "assets/[name]-[hash].mjs", | |
| }, | |
| external: ["better-sqlite3"], | |
| }, | |
| }, | |
| }; | |
| }, | |
| }, | |
| ], | |
| ssr: command === "build" ? { noExternal: true, target: "node" } : {}, | |
| }; | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment