1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

added tsdv to support es modules imports

This commit is contained in:
Amit Genish
2022-07-31 21:42:19 +03:00
parent 14fb272710
commit e2567577ac
3 changed files with 31 additions and 8 deletions

View File

@@ -2,14 +2,23 @@
"name": "vite-plugin-cesium",
"version": "1.2.19",
"description": "Cesium library plugin for Vite",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},
"scripts": {
"build": "tsc",
"dev": "tsc -w"
"dev": "tsdv watch",
"build": "tsdv build",
"prepare": "npm run build"
},
"keywords": [
"vite",
@@ -36,10 +45,12 @@
"@types/node": "^14.14.31",
"@types/serve-static": "^1.13.9",
"prettier": "^2.2.1",
"tsdv": "^0.6.1",
"typescript": "^4.2.2",
"vite": "^2.7.1"
"vite": "^3.0.4"
},
"peerDependencies": {
"cesium": "^1.88.0"
"cesium": "^1.88.0",
"vite": ">=2.7.1"
}
}

View File

@@ -1,11 +1,17 @@
{
"extends": "@tsconfig/node12/tsconfig.json",
"include": [
"src"
],
"compilerOptions": {
"outDir": "dist",
"declaration": true,
"target": "ES2017",
"module": "commonjs",
"removeComments": false,
},
"strict": true,
"moduleResolution": "node",
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
}
}

6
tsdv.config.ts Normal file
View File

@@ -0,0 +1,6 @@
import { defineConfig } from 'tsdv';
export default defineConfig({
target: 'node12',
formats: ['es', 'cjs']
});