added tsdv to support es modules imports
This commit is contained in:
23
package.json
23
package.json
@@ -2,14 +2,23 @@
|
|||||||
"name": "vite-plugin-cesium",
|
"name": "vite-plugin-cesium",
|
||||||
"version": "1.2.19",
|
"version": "1.2.19",
|
||||||
"description": "Cesium library plugin for Vite",
|
"description": "Cesium library plugin for Vite",
|
||||||
"main": "dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"module": "./dist/index.mjs",
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
"files": [
|
"files": [
|
||||||
"dist"
|
"dist"
|
||||||
],
|
],
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
|
"import": "./dist/index.mjs",
|
||||||
|
"require": "./dist/index.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"dev": "tsdv watch",
|
||||||
"dev": "tsc -w"
|
"build": "tsdv build",
|
||||||
|
"prepare": "npm run build"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"vite",
|
"vite",
|
||||||
@@ -36,10 +45,12 @@
|
|||||||
"@types/node": "^14.14.31",
|
"@types/node": "^14.14.31",
|
||||||
"@types/serve-static": "^1.13.9",
|
"@types/serve-static": "^1.13.9",
|
||||||
"prettier": "^2.2.1",
|
"prettier": "^2.2.1",
|
||||||
|
"tsdv": "^0.6.1",
|
||||||
"typescript": "^4.2.2",
|
"typescript": "^4.2.2",
|
||||||
"vite": "^2.7.1"
|
"vite": "^3.0.4"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"cesium": "^1.88.0"
|
"cesium": "^1.88.0",
|
||||||
|
"vite": ">=2.7.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,11 +1,17 @@
|
|||||||
{
|
{
|
||||||
"extends": "@tsconfig/node12/tsconfig.json",
|
|
||||||
"include": [
|
"include": [
|
||||||
"src"
|
"src"
|
||||||
],
|
],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "dist",
|
"outDir": "dist",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
|
"target": "ES2017",
|
||||||
|
"module": "commonjs",
|
||||||
"removeComments": false,
|
"removeComments": false,
|
||||||
},
|
"strict": true,
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"forceConsistentCasingInFileNames": true
|
||||||
|
}
|
||||||
}
|
}
|
6
tsdv.config.ts
Normal file
6
tsdv.config.ts
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import { defineConfig } from 'tsdv';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
target: 'node12',
|
||||||
|
formats: ['es', 'cjs']
|
||||||
|
});
|
Reference in New Issue
Block a user