mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
updated config for rollup
This commit is contained in:
parent
4663acf9b8
commit
d6e63270fc
18
package-lock.json
generated
18
package-lock.json
generated
@ -32,6 +32,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
|
||||
"@rollup/plugin-alias": "^5.1.1",
|
||||
"@rollup/plugin-typescript": "^12.1.2",
|
||||
"@testing-library/jest-dom": "^6.6.3",
|
||||
"@testing-library/react": "^16.2.0",
|
||||
@ -716,6 +717,23 @@
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@rollup/plugin-alias": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-alias/-/plugin-alias-5.1.1.tgz",
|
||||
"integrity": "sha512-PR9zDb+rOzkRb2VD+EuKB7UC41vU5DIwZ5qqCpk0KJudcWAyi8rvYOhS7+L5aZCspw1stTViLgN5v6FF1p5cgQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"rollup": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@rollup/plugin-typescript": {
|
||||
"version": "12.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-12.1.2.tgz",
|
||||
|
||||
@ -4,9 +4,9 @@
|
||||
"description": "Reuseable React Components to build mapping apps for real life communities and networks",
|
||||
"repository": "https://github.com/utopia-os/utopia-ui",
|
||||
"homepage": "https://utopia-os.org/",
|
||||
"module": "dist/index.esm.js",
|
||||
"main": "dist/index.cjs",
|
||||
"types": "dist/index.d.ts",
|
||||
"module": "./dist/index.esm.js",
|
||||
"main": "./dist/index.cjs",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/index.esm.js",
|
||||
@ -32,6 +32,7 @@
|
||||
"license": "GPL-3.0-only",
|
||||
"devDependencies": {
|
||||
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
|
||||
"@rollup/plugin-alias": "^5.1.1",
|
||||
"@rollup/plugin-typescript": "^12.1.2",
|
||||
"@testing-library/jest-dom": "^6.6.3",
|
||||
"@testing-library/react": "^16.2.0",
|
||||
@ -68,7 +69,6 @@
|
||||
"rollup": "^4.34.6",
|
||||
"rollup-plugin-dts": "^6.1.1",
|
||||
"rollup-plugin-postcss": "^4.0.2",
|
||||
"rollup-plugin-typescript2": "^0.32.1",
|
||||
"tailwindcss": "^3.3.1",
|
||||
"typedoc": "^0.27.6",
|
||||
"typedoc-plugin-coverage": "^3.4.1",
|
||||
|
||||
@ -1,6 +1,17 @@
|
||||
import path from 'path'
|
||||
import { fileURLToPath } from 'url'
|
||||
|
||||
import alias from '@rollup/plugin-alias'
|
||||
import typescript from '@rollup/plugin-typescript'
|
||||
import { dts } from 'rollup-plugin-dts'
|
||||
import postcss from 'rollup-plugin-postcss'
|
||||
import typescript from 'rollup-plugin-typescript2'
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url)
|
||||
const __dirname = path.dirname(__filename)
|
||||
|
||||
const aliasConfig = alias({
|
||||
entries: [{ find: '#types', replacement: path.resolve(__dirname, 'types') }],
|
||||
})
|
||||
|
||||
export default [
|
||||
{
|
||||
@ -16,10 +27,13 @@ export default [
|
||||
},
|
||||
],
|
||||
plugins: [
|
||||
aliasConfig,
|
||||
postcss({
|
||||
plugins: [],
|
||||
}),
|
||||
typescript(),
|
||||
typescript({
|
||||
tsconfig: './tsconfig.json',
|
||||
}),
|
||||
],
|
||||
external: [
|
||||
'react',
|
||||
@ -54,8 +68,9 @@ export default [
|
||||
],
|
||||
},
|
||||
{
|
||||
input: 'types/index.d.ts',
|
||||
input: 'src/index.tsx',
|
||||
output: [{ file: 'dist/index.d.ts', format: 'es' }],
|
||||
plugins: [dts()],
|
||||
plugins: [aliasConfig, dts()],
|
||||
external: [/\.css$/],
|
||||
},
|
||||
]
|
||||
|
||||
@ -1,14 +1,15 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"declaration": true,
|
||||
"declarationDir": "dist/types", // 🔹 Muss innerhalb von dist/ liegen
|
||||
"emitDeclarationOnly": true, // Nur `.d.ts` generieren, kein JavaScript
|
||||
"module": "esnext",
|
||||
"target": "ESNext",
|
||||
"lib": ["es6", "dom","es2015", "es2016", "es2017", "es2020"],
|
||||
"sourceMap": true,
|
||||
"allowJs": false,
|
||||
"jsx": "react-jsx",
|
||||
"declaration": true,
|
||||
"declarationDir": "./types",
|
||||
"moduleResolution": "node",
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noImplicitReturns": true,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user