Skip to content

Commit

Permalink
修改部分配置,让build后chrome内核的流量器可以离线打开
Browse files Browse the repository at this point in the history
  • Loading branch information
makuwa8992 committed Oct 7, 2024
1 parent 2abb611 commit 73ac09e
Show file tree
Hide file tree
Showing 7 changed files with 2,033 additions and 206 deletions.
2,229 changes: 2,025 additions & 204 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"devDependencies": {
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"@vitejs/plugin-legacy": "^5.4.2",
"@vitejs/plugin-react": "^4.2.0",
"eslint": "^8.53.0",
"eslint-plugin-react": "^7.33.2",
Expand Down
Binary file modified public/icon/FractionateEverything.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/icon/GenesisBook.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/icon/MoreMegaStructure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/icon/Vanilla.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 7 additions & 2 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import imageminWebp from 'imagemin-webp';
import path from 'path';
import Spritesmith from 'spritesmith';
import {defineConfig} from 'vite';
import legacy from '@vitejs/plugin-legacy';

/** This generates one sprite image per game name when `mode == "development"` (`npm run dev`) */
function get_sprite_plugins(mode) {
Expand Down Expand Up @@ -73,7 +74,7 @@ function get_sprite_plugins(mode) {

// https://vitejs.dev/config/
export default defineConfig(({mode}) => ({
base: "",
base: "./",
define: {
'import.meta.env.VITE_APP_VERSION': JSON.stringify(require('./package.json').version),
},
Expand All @@ -84,6 +85,10 @@ export default defineConfig(({mode}) => ({
},
plugins: [
react(),
...get_sprite_plugins(mode)
...get_sprite_plugins(mode),
legacy({
targets: ['ie>=11'],
additionalLegacyPolyfills:['regenerator-runtime/runtime'],
})
]
}))

0 comments on commit 73ac09e

Please sign in to comment.