fix: build

This commit is contained in:
unanmed 2024-09-30 10:24:48 +08:00
parent 61ba4f9a7e
commit f97e7c1bff
8 changed files with 323 additions and 271 deletions

View File

@ -63,7 +63,7 @@
"typescript": "^5.5.4",
"unplugin-vue-components": "^0.22.12",
"vite": "^4.5.3",
"vue-tsc": "^1.8.27",
"vue-tsc": "^2.1.6",
"ws": "^8.18.0"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -10,6 +10,7 @@ import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import { splitResource } from './resource.js';
import compressing from 'compressing';
import json from '@rollup/plugin-json';
const type = process.argv[2];
const map = false;
@ -137,7 +138,8 @@ const compress = type === 'dist';
}),
terser(),
resolve(),
commonjs()
commonjs(),
json()
]
});
await build.write({

View File

@ -966,6 +966,7 @@ export class Layer extends Container {
const w = this.mapWidth;
const h = this.mapHeight;
// todo: 如何定向优化?
// this.autotiles = {};
/**

View File

@ -29,7 +29,7 @@
</template>
<script lang="ts" setup>
import { onMounted, onUpdated, ref, watch } from 'vue';
import { onMounted, onUpdated, Ref, ref, watch } from 'vue';
import Box from '../components/box.vue';
import { GameUi } from '@/core/main/custom/ui';
import type { DamageEnemy, EnemyInfo } from '@/game/enemy/damage';

View File

@ -4,7 +4,8 @@
"target": "ESNext",
"useDefineForClassFields": true,
"module": "ESNext",
"moduleResolution": "Node",
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"strict": true,
"jsx": "preserve",
"jsxImportSource": "vue",
@ -20,12 +21,6 @@
"@ui/*": ["src/ui/*"]
}
},
"include": [
"src/**/*.ts",
"src/**/*.d.ts",
"src/**/*.tsx",
"src/**/*.vue",
"mota.config.ts"
],
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
"references": [{ "path": "./tsconfig.node.json" }]
}

View File

@ -7,5 +7,5 @@
"allowSyntheticDefaultImports": true,
"strict": true
},
"include": ["vite.config.ts", "mota.config.ts", "script/**/*.ts"]
"include": ["vite.config.ts", "script/**/*.ts"]
}

View File

@ -4,7 +4,6 @@ import legacy from '@vitejs/plugin-legacy';
import components from 'unplugin-vue-components/vite';
import vuejsx from '@vitejs/plugin-vue-jsx'
import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers';
import motaConfig from './mota.config';
import { resolve } from 'path';
import postcssPresetEnv from 'postcss-preset-env';