From 697b0eb3ee4695264990f956e2b2caa456b5e044 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benny=20Powers=20-=20=D7=A2=D7=9D=20=D7=99=D7=A9=D7=A8?= =?UTF-8?q?=D7=90=D7=9C=20=D7=97=D7=99!?= Date: Tue, 17 Sep 2024 18:12:13 +0300 Subject: [PATCH] fix: add subpath exports Hopefully fix this error from JSPM generator: ``` Error: No './components/prism-markup.js' exports subpath defined in https://ga.jspm.io/npm:prism-esm@1.29.0-fix.4/ resolving prism-esm/components/prism-markup.js imported from ./elements/rh-code-block/prism.js. at throwExportNotDefined (./node_modules/@jspm/generator/dist/generator-94df858f.js:1742:19) at Resolver.resolveExport (./node_modules/@jspm/generator/dist/generator-94df858f.js:1774:17) at async TraceMap.resolve (./node_modules/@jspm/generator/dist/generator-94df858f.js:3022:59) at async TraceMap.visit (./node_modules/@jspm/generator/dist/generator-94df858f.js:2808:26) at async ./node_modules/@jspm/generator/dist/generator-94df858f.js:2845:13 at async Promise.all (index 8) at async TraceMap.visit (./node_modules/@jspm/generator/dist/generator-94df858f.js:2840:9) at async ./node_modules/@jspm/generator/dist/generator-94df858f.js:2845:13 at async Promise.all (index 9) at async TraceMap.visit (./node_modules/@jspm/generator/dist/generator-94df858f.js:2840:9) at async Generator._install (./node_modules/@jspm/generator/dist/generator-94df858f.js:4112:13) at async generateImportMap (./docs/_plugins/shortcodes/renderInstallation.cjs:13:3) at async Object.renderInstall (./docs/_plugins/shortcodes/renderInstallation.cjs:86:3) ``` --- package.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package.json b/package.json index 077879d4c..0a20bf96c 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,10 @@ "description": "A prism fork intended for ESM", "type": "module", "main": "prism.js", + "exports": { + ".": "prism.js", + "./*": "./*" + }, "style": "themes/prism.css", "engines": { "node": ">=6"