Visualize Your Ideas With Code
fix: support legacy imports again (#868)
Jacob77c4e2eeb8b0
diff --git a/packages/2d/.gitignore b/packages/2d/.gitignorenew file mode 100644index 00000000..7caae6fc--- /dev/null+++ b/packages/2d/.gitignore@@ -0,0 +1 @@+editor\ No newline at end of filediff --git a/packages/2d/package.json b/packages/2d/package.jsonindex fdba703f..4341203f 100644--- a/packages/2d/package.json+++ b/packages/2d/package.json@@ -6,24 +6,8 @@"homepage": "https://motioncanvas.io/","bugs": "https://github.com/motion-canvas/motion-canvas/issues","license": "MIT",- "main": "lib/runtime/index.js",- "types": "./lib/runtime/index.d.ts",- "exports": {- ".": "./lib/runtime/index.js",- "./lib": "./lib/runtime/index.js",- "./lib/components": "./lib/runtime/components/index.js",- "./lib/curves": "./lib/runtime/curves/index.js",- "./lib/decorators": "./lib/runtime/decorators/index.js",- "./lib/partials": "./lib/runtime/partials/index.js",- "./lib/scenes": "./lib/runtime/scenes/index.js",- "./lib/utils": "./lib/runtime/utils/index.js",- "./lib/*": {- "import": "./lib/runtime/*.js",- "default": "./lib/runtime/*"- },- "./editor": "./lib/editor/index.js",- "./tsconfig.project.json": "./tsconfig.project.json"- },+ "main": "lib/index.js",+ "types": "./lib/index.d.ts","scripts": {"dev": "tspc -b src -w","build": "tspc -b src/tsconfig.build.json",@@ -37,6 +21,7 @@},"files": ["lib",+ "editor","src","tsconfig.project.json"],diff --git a/packages/2d/src/editor/tsconfig.json b/packages/2d/src/editor/tsconfig.jsonindex 5fe85953..dc0f139d 100644--- a/packages/2d/src/editor/tsconfig.json+++ b/packages/2d/src/editor/tsconfig.json@@ -1,6 +1,8 @@{"extends": "../tsconfig.base.json","compilerOptions": {+ "rootDir": ".",+ "outDir": "../../editor","jsx": "react-jsx","jsxImportSource": "preact"},diff --git a/packages/2d/src/runtime/tsconfig.json b/packages/2d/src/runtime/tsconfig.jsonindex 5e891589..fc43f783 100644--- a/packages/2d/src/runtime/tsconfig.json+++ b/packages/2d/src/runtime/tsconfig.json@@ -1,17 +1,16 @@{"extends": "../tsconfig.base.json","compilerOptions": {+ "rootDir": ".",+ "outDir": "../../lib","types": ["node"],"jsx": "react-jsx",- "jsxImportSource": "@motion-canvas/2d/lib",+ "jsxImportSource": "@motion-canvas/2d/src/runtime","plugins": [{"transform": "@motion-canvas/internal/transformers/markdown-literals.js"}- ],- "paths": {- "@motion-canvas/2d/lib/*": ["./*"]- }+ ]},"include": ["**/*"]}diff --git a/packages/2d/src/tsconfig.base.json b/packages/2d/src/tsconfig.base.jsonindex 8b18ddae..314e6f4d 100644--- a/packages/2d/src/tsconfig.base.json+++ b/packages/2d/src/tsconfig.base.json@@ -1,7 +1,5 @@{"compilerOptions": {- "rootDir": ".",- "outDir": "../lib","strict": true,"noImplicitOverride": true,"module": "esnext",diff --git a/packages/core/tsconfig.project.json b/packages/core/tsconfig.project.jsonindex cba20335..b060143e 100644--- a/packages/core/tsconfig.project.json+++ b/packages/core/tsconfig.project.json@@ -6,7 +6,7 @@"target": "es2020","allowJs": true,"noEmit": true,- "moduleResolution": "bundler",+ "moduleResolution": "node","resolveJsonModule": true,"allowSyntheticDefaultImports": true,"experimentalDecorators": true