From 0c53d21a1493f2c92f2df6ce2da59fcd3c9e1bdc Mon Sep 17 00:00:00 2001 From: Sven van de Scheur Date: Mon, 19 Feb 2024 13:57:14 +0100 Subject: [PATCH] :green_heart: - ci: attempt to fix the build --- .github/workflows/ci.yaml | 2 ++ package.json | 12 ++++++------ rollup.config.mjs | 15 +++++++++------ tsconfig.json | 5 +++-- 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ba003f61..39158c1f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -29,6 +29,8 @@ jobs: run: npm install - name: Build source + env: + NODE_OPTIONS: "--max_old_space_size=4096" run: npm run build - name: build package diff --git a/package.json b/package.json index 7ddc7f6a..25b1f84d 100644 --- a/package.json +++ b/package.json @@ -23,11 +23,6 @@ "rollup": "rollup -c", "prepare": "husky install" }, - "exports": { - ".": "./dist/esm/index.js", - "./components": "./dist/esm/components/index.js", - "./style": "./dist/esm/index.css" - }, "main": "dist/cjs/index.js", "module": "src/esm/index.js", "style": "dist/esm/index.css", @@ -40,7 +35,12 @@ "dist", "src" ], - "types": "dist/types/index.d.ts", + "exports": { + ".": "./dist/esm/index.js", + "./components": "./dist/esm/componets/index.js", + "./style": "./dist/esm/index.css" + }, + "types": "dist/esm/index.d.ts", "repository": { "type": "git", "url": "git+https://github.com/maykinmedia/maykin-ui.git" diff --git a/rollup.config.mjs b/rollup.config.mjs index ab8e0f70..ca6f6d9a 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -6,7 +6,7 @@ import peerDepsExternal from "rollup-plugin-peer-deps-external"; import styles from "rollup-plugin-styler"; import postcss_url from "postcss-url"; import json from "@rollup/plugin-json"; -import { dts } from "rollup-plugin-dts"; +// import { dts } from "rollup-plugin-dts"; export default [ { @@ -51,12 +51,15 @@ export default [ }), terser() ] - }, { - input: "dist/esm/index.js", - output: [{ file: "dist/types/index.d.ts", format: "esm" }], - external: [/\.scss$/], - plugins: [dts()] + }, + // FIXME: Replaced with "moduleResolution": "bundler", + // { + // input: "dist/esm/index.js", + // output: [{ file: "dist/types//index.d.ts", format: "esm" }], + // external: [/\.scss$/], + // plugins: [dts()] + // }, { input: "src/lib/i18n/compiled/en.json", output: { dir: "dist/messages" }, plugins: [json()] }, { input: "src/lib/i18n/compiled/nl.json", output: { dir: "dist/messages" }, plugins: [json()] } ]; diff --git a/tsconfig.json b/tsconfig.json index c5f96197..376cf9e7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,14 +1,15 @@ { "compilerOptions": { "module": "ESNext", + "moduleResolution": "bundler", "target": "ESNext", "outDir": "dist", "strict": true, "jsx": "react", "declaration": true, "declarationDir": "dist/types", - "moduleResolution": "node", "esModuleInterop": true, "allowSyntheticDefaultImports": true - } + }, + "exclude": ["**/*.stories.tsx", "**/*.stories.tsx", "**/*.stories.md", ".storybook"] }