chore(core-shared): migrate build to tsdown
parent
675d8b0179
commit
59912a00bc
|
|
@ -11,8 +11,8 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsdown",
|
"build": "pnpm exec tsdown",
|
||||||
"stub": "tsdown"
|
"stub": "pnpm exec tsdown"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"dist"
|
"dist"
|
||||||
|
|
@ -53,27 +53,27 @@
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"exports": {
|
"exports": {
|
||||||
"./constants": {
|
"./constants": {
|
||||||
"types": "./dist/constants/index.d.mts",
|
"types": "./dist/constants/index.d.ts",
|
||||||
"default": "./dist/constants/index.mjs"
|
"default": "./dist/constants/index.mjs"
|
||||||
},
|
},
|
||||||
"./utils": {
|
"./utils": {
|
||||||
"types": "./dist/utils/index.d.mts",
|
"types": "./dist/utils/index.d.ts",
|
||||||
"default": "./dist/utils/index.mjs"
|
"default": "./dist/utils/index.mjs"
|
||||||
},
|
},
|
||||||
"./color": {
|
"./color": {
|
||||||
"types": "./dist/color/index.d.mts",
|
"types": "./dist/color/index.d.ts",
|
||||||
"default": "./dist/color/index.mjs"
|
"default": "./dist/color/index.mjs"
|
||||||
},
|
},
|
||||||
"./cache": {
|
"./cache": {
|
||||||
"types": "./dist/cache/index.d.mts",
|
"types": "./dist/cache/index.d.ts",
|
||||||
"default": "./dist/cache/index.mjs"
|
"default": "./dist/cache/index.mjs"
|
||||||
},
|
},
|
||||||
"./store": {
|
"./store": {
|
||||||
"types": "./dist/store.d.mts",
|
"types": "./dist/store.d.ts",
|
||||||
"default": "./dist/store.mjs"
|
"default": "./dist/store.mjs"
|
||||||
},
|
},
|
||||||
"./global-state": {
|
"./global-state": {
|
||||||
"types": "./dist/global-state.d.mts",
|
"types": "./dist/global-state.d.ts",
|
||||||
"default": "./dist/global-state.mjs"
|
"default": "./dist/global-state.mjs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import timezone from 'dayjs/plugin/timezone';
|
import timezone from 'dayjs/plugin/timezone.js';
|
||||||
import utc from 'dayjs/plugin/utc';
|
import utc from 'dayjs/plugin/utc.js';
|
||||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import timezone from 'dayjs/plugin/timezone';
|
import timezone from 'dayjs/plugin/timezone.js';
|
||||||
import utc from 'dayjs/plugin/utc';
|
import utc from 'dayjs/plugin/utc.js';
|
||||||
|
|
||||||
dayjs.extend(utc);
|
dayjs.extend(utc);
|
||||||
dayjs.extend(timezone);
|
dayjs.extend(timezone);
|
||||||
|
|
|
||||||
|
|
@ -12,4 +12,7 @@ export default defineConfig({
|
||||||
'utils/index': 'src/utils/index.ts',
|
'utils/index': 'src/utils/index.ts',
|
||||||
},
|
},
|
||||||
format: ['esm'],
|
format: ['esm'],
|
||||||
|
outExtensions: () => ({
|
||||||
|
dts: '.d.ts',
|
||||||
|
}),
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue