refactor
This commit is contained in:
@@ -5,7 +5,7 @@ export default [
|
||||
ignores: ['dist/**', 'build/**', 'node_modules/**'],
|
||||
},
|
||||
{
|
||||
files: ['src/**/*.{ts,tsx}', 'vite.config.ts', 'vitest.setup.ts'],
|
||||
files: ['src/**/*.{ts,tsx}', 'vite.config.mts', 'vitest.setup.ts'],
|
||||
languageOptions: {
|
||||
parser: tsParser,
|
||||
ecmaVersion: 'latest',
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
"dev": "vite",
|
||||
"start": "vite",
|
||||
"build": "vite build",
|
||||
"lint": "eslint \"src/**/*.{ts,tsx}\" vite.config.ts vitest.setup.ts",
|
||||
"lint": "eslint \"src/**/*.{ts,tsx}\" vite.config.mts vitest.setup.ts",
|
||||
"preview": "vite preview",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest"
|
||||
|
||||
@@ -19,5 +19,5 @@ vi.mock('react-router-dom', async () => {
|
||||
});
|
||||
|
||||
test('renders App', () => {
|
||||
render(<App faro={undefined}/>);
|
||||
render(<App />);
|
||||
});
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
},
|
||||
"include": [
|
||||
"src",
|
||||
"vite.config.ts"
|
||||
"vite.config.mts"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -4,13 +4,13 @@ import react from '@vitejs/plugin-react';
|
||||
export default defineConfig(({ mode }) => {
|
||||
const env = loadEnv(mode, process.cwd(), '');
|
||||
const port = Number(env.PORT || 5173);
|
||||
const https = env.HTTPS === 'true';
|
||||
const httpsEnabled = env.HTTPS === 'true';
|
||||
|
||||
return {
|
||||
plugins: [react()],
|
||||
server: {
|
||||
port,
|
||||
https,
|
||||
...(httpsEnabled ? { https: {} } : {}),
|
||||
strictPort: true,
|
||||
allowedHosts: ['localhost', 'host.docker.internal', 'frontend'],
|
||||
},
|
||||
Reference in New Issue
Block a user