Skip to content

Commit

Permalink
vite-spa
Browse files Browse the repository at this point in the history
  • Loading branch information
msenechal committed Mar 4, 2024
1 parent 59a3d1c commit 0e321f2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.21.3",
"tailwindcss": "^3.4.1"
"tailwindcss": "^3.4.1",
"vite-plugin-single-spa": "^0.6.1"
},
"devDependencies": {
"@types/node": "^20.11.16",
Expand Down
7 changes: 5 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import packageJson from './package.json';
import vitePluginSingleSpa from 'vite-plugin-single-spa';

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
plugins: [react(), vitePluginSingleSpa({
type: 'root'
})],
define: {
'import.meta.env.PACKAGE_VERSION': JSON.stringify(packageJson.version),
},
server: {
port: 3000,
},
});
});
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5376,6 +5376,11 @@ util-deprecate@^1.0.2:
resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz"
integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==

vite-plugin-single-spa@^0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/vite-plugin-single-spa/-/vite-plugin-single-spa-0.6.1.tgz#20fc6aa76eb60078e291fa240e530ee497d13110"
integrity sha512-zxglV9A4DKdQ6zwwRJrZnwWmF2c6/Wrkll7tpM9ZYPbSgJOn1PBAl4xKQ1h8pCsKAFJYoCRJ8d2mXL5ZqUeALQ==

vite@^4.4.5:
version "4.5.2"
resolved "https://registry.npmjs.org/vite/-/vite-4.5.2.tgz"
Expand Down

0 comments on commit 0e321f2

Please sign in to comment.