Yuki Takei 2 лет назад
Родитель
Сommit
607fba86ce
3 измененных файлов с 8 добавлено и 2 удалено
  1. 1 0
      packages/editor/.eslintrc.cjs
  2. 1 1
      packages/editor/src/App.tsx
  3. 6 1
      packages/editor/tsconfig.json

+ 1 - 0
packages/editor/.eslintrc.cjs

@@ -15,6 +15,7 @@ module.exports = {
   },
   },
   plugins: ['react-refresh'],
   plugins: ['react-refresh'],
   rules: {
   rules: {
+    'import/no-absolute-path': 'off',
     'react-refresh/only-export-components': [
     'react-refresh/only-export-components': [
       'warn',
       'warn',
       { allowConstantExport: true },
       { allowConstantExport: true },

+ 1 - 1
packages/editor/src/App.tsx

@@ -1,6 +1,6 @@
 import { useState } from 'react';
 import { useState } from 'react';
 
 
-import viteLogo from '../public/vite.svg';
+import viteLogo from '/vite.svg';
 
 
 import reactLogo from './assets/react.svg';
 import reactLogo from './assets/react.svg';
 
 

+ 6 - 1
packages/editor/tsconfig.json

@@ -18,7 +18,12 @@
     "strict": true,
     "strict": true,
     "noUnusedLocals": true,
     "noUnusedLocals": true,
     "noUnusedParameters": true,
     "noUnusedParameters": true,
-    "noFallthroughCasesInSwitch": true
+    "noFallthroughCasesInSwitch": true,
+
+    "baseUrl": ".",
+    "paths": {
+      "/*": ["./public/*"],
+    }
   },
   },
   "include": ["src"],
   "include": ["src"],
   "references": [{ "path": "./tsconfig.node.json" }]
   "references": [{ "path": "./tsconfig.node.json" }]