From 2e65393544f27be744161619df34a82f1a479562 Mon Sep 17 00:00:00 2001 From: Soybean Date: Wed, 5 Jun 2024 07:10:32 +0800 Subject: [PATCH] chore(projects): update tsx require ts file --- eslint.config.js | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index eb91409..478da2b 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,15 +1,7 @@ -import 'tsx'; -import { createRequire } from 'node:module'; -import { defineConfig as defineConfig2 } from './dist/index.js'; +import { require } from 'tsx/cjs/api'; -const require = createRequire(import.meta.url); - -const { defineConfig: defineConfig1 } = require('./src/index.ts'); - -const useBuild = false; - -/** @type {import('./src/index.ts').defineConfig} */ -const defineConfig = useBuild ? defineConfig2 : defineConfig1; +/** @type {{ defineConfig: import('./src/index.ts').defineConfig }} */ +const { defineConfig } = require('./src/index.ts', import.meta.url); export default defineConfig({ vue: true,