Skip to content

Commit f79c347

Browse files
committed
update vite, edit tsconfig and imports
1 parent ac3671e commit f79c347

File tree

5 files changed

+89
-14
lines changed

5 files changed

+89
-14
lines changed

package-lock.json

Lines changed: 83 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
"ts-loader": "^9.3.1",
145145
"ts-node": "^10.9.1",
146146
"typescript": "^4.8.4",
147-
"vite": "^6.2.3",
147+
"vite": "^6.3.3",
148148
"vite-plugin-environment": "^1.1.3",
149149
"vite-plugin-html": "^3.2.0"
150150
}

server/models/userModel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import fs from 'fs';
33
import log from '../logger';
44
import path from 'path';
55

6-
const dotenv = require('dotenv');
6+
import dotenv from 'dotenv';
77
dotenv.config();
88

99
const { USER_DB_URL_MYSQL, USER_DB_USER_MYSQL, USER_DB_PW_MYSQL, DB_PORT } = process.env;

tsconfig.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
1212

1313
/* Language and Environment */
14-
"target": "ES2020" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
14+
"target": "ES2022" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
1515
"lib": ["DOM", "DOM.Iterable", "ES2022"],
1616
"jsx": "react",
1717
"experimentalDecorators": true /* Enable experimental support for TC39 stage 2 draft decorators. */,
@@ -25,9 +25,9 @@
2525
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
2626

2727
/* Modules */
28-
"module": "Node16" /* Specify what module code is generated. */,
28+
"module": "NodeNext" /* Specify what module code is generated. */,
2929
// "rootDir": "./", /* Specify the root folder within your source files. */
30-
"moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */,
30+
"moduleResolution": "NodeNext" /* Specify how TypeScript looks up a file from a given module specifier. */,
3131
"baseUrl": "./" /* Specify the base directory to resolve non-relative module names. */,
3232
"paths": {
3333
"@/*": ["./src/*"]
@@ -42,7 +42,7 @@
4242
] /* Specify type package names to be included without being referenced in a source file. */,
4343
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
4444
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
45-
// "resolveJsonModule": true, /* Enable importing .json files. */
45+
"resolveJsonModule": true /* Enable importing .json files. */,
4646
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
4747

4848
/* JavaScript Support */

vite.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { defineConfig } from 'vite';
22
import dns from 'dns';
33
import react from '@vitejs/plugin-react';
4-
const fs = require('fs');
54
import { resolve } from 'path';
65

76
dns.setDefaultResultOrder('verbatim');

0 commit comments

Comments
 (0)