mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 04:22:13 +08:00
Chore: Remove rollup-plugin-dts (#106442)
* chore(packages): remove rollup dts plugin * build(packages): add rollup copy plugin settings to copy ts declarations to esm and cjs builds * build(packages): remove copy settings as result doesnt pass attw cli checks * build(packages): use single types output in dist/types directory * ci(packages): update prepare and validate scripts for single type builds * fix(grafana-schema): copy raw types to dist/esm directory for grafana/scenes support
This commit is contained in:
@ -37,7 +37,7 @@
|
||||
"publishConfig": {
|
||||
"main": "./dist/cjs/index.cjs",
|
||||
"module": "./dist/esm/index.mjs",
|
||||
"types": "./dist/cjs/index.d.cts",
|
||||
"types": "./dist/types/index.d.ts",
|
||||
"access": "public"
|
||||
},
|
||||
"files": [
|
||||
@ -193,7 +193,6 @@
|
||||
"rimraf": "6.0.1",
|
||||
"rollup": "^4.22.4",
|
||||
"rollup-plugin-copy": "3.5.0",
|
||||
"rollup-plugin-dts": "^6.1.1",
|
||||
"rollup-plugin-esbuild": "6.2.0",
|
||||
"rollup-plugin-node-externals": "^8.0.0",
|
||||
"rollup-plugin-svg-import": "3.0.0",
|
||||
|
@ -2,7 +2,7 @@ import { createRequire } from 'node:module';
|
||||
import copy from 'rollup-plugin-copy';
|
||||
import svg from 'rollup-plugin-svg-import';
|
||||
|
||||
import { cjsOutput, entryPoint, esmOutput, plugins, tsDeclarationOutput } from '../rollup.config.parts';
|
||||
import { cjsOutput, entryPoint, esmOutput, plugins } from '../rollup.config.parts';
|
||||
|
||||
const rq = createRequire(import.meta.url);
|
||||
const icons = rq('../../public/app/core/icons/cached.json');
|
||||
@ -38,18 +38,4 @@ export default [
|
||||
],
|
||||
output: [cjsOutput(pkg), esmOutput(pkg, 'grafana-ui')],
|
||||
},
|
||||
tsDeclarationOutput(pkg),
|
||||
tsDeclarationOutput(pkg, {
|
||||
input: './compiled/unstable.d.ts',
|
||||
output: [
|
||||
{
|
||||
file: './dist/cjs/unstable.d.cts',
|
||||
format: 'cjs',
|
||||
},
|
||||
{
|
||||
file: './dist/esm/unstable.d.mts',
|
||||
format: 'es',
|
||||
},
|
||||
],
|
||||
}),
|
||||
];
|
||||
|
@ -2,7 +2,7 @@
|
||||
"compilerOptions": {
|
||||
"jsx": "react-jsx",
|
||||
"baseUrl": "./",
|
||||
"declarationDir": "./compiled",
|
||||
"declarationDir": "./dist/types",
|
||||
"emitDeclarationOnly": true,
|
||||
"isolatedModules": true,
|
||||
"allowJs": true,
|
||||
|
Reference in New Issue
Block a user