From 203506cb1efc5a9f968b66ff5da2dbd998d42367 Mon Sep 17 00:00:00 2001 From: smallstonesk <575913857@qq.com> Date: Fri, 12 Mar 2021 15:44:49 +0800 Subject: [PATCH] feat: modify running exampke method --- example/package.json | 17 +++++++++++++++++ example/src/pages/index.tsx | 2 +- packages/core/tsconfig.json | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 example/package.json diff --git a/example/package.json b/example/package.json new file mode 100644 index 0000000..91a6fa6 --- /dev/null +++ b/example/package.json @@ -0,0 +1,17 @@ +{ + "scripts": { + "start": "umi dev", + "build": "umi build", + "postinstall": "umi generate tmp" + }, + "dependencies": { + "@ant-design/pro-layout": "^6.5.0", + "@imove/core": "^0.3.8", + "@umijs/preset-react": "1.x", + "umi": "^3.3.7" + }, + "devDependencies": { + "@types/react": "^16.9.0", + "@types/react-dom": "^16.9.0" + } +} diff --git a/example/src/pages/index.tsx b/example/src/pages/index.tsx index b7d66f2..355f93f 100644 --- a/example/src/pages/index.tsx +++ b/example/src/pages/index.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import IMove from '../../../packages/core/dist/core.esm.js'; +import IMove from '@imove/core'; const onSave = (data: { nodes: any; edges: any }): void => { console.log(data); diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json index 3cc0cb5..70ea1ac 100644 --- a/packages/core/tsconfig.json +++ b/packages/core/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig", "compilerOptions": { - "target": "ESNext", + "target": "ES2015", "outDir": "dist/types", "jsx": "react", "esModuleInterop": true