-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvite.config.ts
50 lines (48 loc) · 1.2 KB
/
vite.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import checker from "vite-plugin-checker";
import eslint from "vite-plugin-eslint";
import stylelint from "vite-plugin-stylelint";
// eslint-disable-next-line no-restricted-imports
import customManifestPlugin from "./customManifestPlugin";
const BASE_URL = "/react-isometric-game";
// https://vitejs.dev/config/
export default defineConfig({
base: BASE_URL,
build: {
manifest: false,
chunkSizeWarningLimit: 1000,
},
resolve: {
alias: [
{ find: "@src", replacement: "/src" },
{ find: "@assets", replacement: "/public/assets" },
],
},
css: {
preprocessorOptions: {
less: {
relativeUrls: true,
javascriptEnabled: true,
},
},
},
plugins: [
customManifestPlugin("./public", BASE_URL),
eslint({
include: ["**/*.ts", "**/*.tsx"],
lintOnStart: true,
}),
stylelint({
lintOnStart: true,
}),
checker({
typescript: true,
}),
react(),
],
define: {
"import.meta.env.__APP_VERSION__": JSON.stringify(process.env.npm_package_version),
"import.meta.env.__APP_BUILD_DATE__": JSON.stringify(new Date().valueOf()),
},
});