From d586439b8c1848a3ddf506641f3aa078333767b3 Mon Sep 17 00:00:00 2001 From: Jon McClure Date: Tue, 9 Jan 2024 11:42:30 +0000 Subject: [PATCH 1/2] try types in exports --- bin/buildPackage/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/buildPackage/index.js b/bin/buildPackage/index.js index c489751b..fcd0d38c 100644 --- a/bin/buildPackage/index.js +++ b/bin/buildPackage/index.js @@ -76,7 +76,11 @@ const build = async () => { if (file === 'index.js') continue; // Always add root index last to exports... pkgExports[`./${prettifyImport(file)}`] = `./dist/${file}`; } - pkgExports['.'] = './dist/index.js'; + pkgExports['.'] = { + types: './dist/@types/index.d.ts', + svelte: './dist/index.js', + default: './dist/index.js', + }; const pkg = fs.readJSONSync(PACKAGE); pkg.type = 'module'; pkg.types = './dist/@types/index.d.ts', From a75f82b6cf9ca15e4b483ef61046ca020ca7e96f Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 9 Jan 2024 11:43:34 +0000 Subject: [PATCH 2/2] built package --- package.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index af78695e..30a62900 100644 --- a/package.json +++ b/package.json @@ -355,7 +355,11 @@ "./scss/tokens/variables/block": "./dist/scss/tokens/variables/_block.scss", "./scss/tokens/variables/main": "./dist/scss/tokens/variables/_main.scss", "./scss/tokens/variables/theme": "./dist/scss/tokens/variables/_theme.scss", - ".": "./dist/index.js" + ".": { + "types": "./dist/@types/index.d.ts", + "svelte": "./dist/index.js", + "default": "./dist/index.js" + } }, "svelte": "./dist/index.js", "bugs": {