diff --git a/packages/astro-prism/component/Prism.astro b/packages/astro-prism/Prism.astro similarity index 96% rename from packages/astro-prism/component/Prism.astro rename to packages/astro-prism/Prism.astro index 66794e2d57..2af5f64ab0 100644 --- a/packages/astro-prism/component/Prism.astro +++ b/packages/astro-prism/Prism.astro @@ -1,6 +1,6 @@ --- import Prism from 'prismjs'; -import { addAstro } from '../index.mjs'; +import { addAstro } from './internal.mjs'; import loadLanguages from 'prismjs/components/index.js'; export interface Props { diff --git a/packages/astro-prism/index.js b/packages/astro-prism/index.js new file mode 100644 index 0000000000..41974a9d74 --- /dev/null +++ b/packages/astro-prism/index.js @@ -0,0 +1 @@ +export { default as Prism } from './Prism.astro'; \ No newline at end of file diff --git a/packages/astro-prism/index.d.ts b/packages/astro-prism/internal.d.ts similarity index 100% rename from packages/astro-prism/index.d.ts rename to packages/astro-prism/internal.d.ts diff --git a/packages/astro-prism/index.mjs b/packages/astro-prism/internal.mjs similarity index 100% rename from packages/astro-prism/index.mjs rename to packages/astro-prism/internal.mjs diff --git a/packages/astro-prism/package.json b/packages/astro-prism/package.json index edf02b4fa6..8a4278250b 100644 --- a/packages/astro-prism/package.json +++ b/packages/astro-prism/package.json @@ -11,16 +11,13 @@ "directory": "packages/astro-prism" }, "homepage": "https://astro.build", - "main": "index.mjs", + "main": "index.js", "scripts": {}, - "files": [ - "component" - ], "exports": { - ".": "./index.mjs", - "./component": "./component/Prism.astro" + ".": "./index.js", + "./internal": "./internal.mjs" }, - "types": "./index.d.ts", + "types": "./internal.d.ts", "keywords": [], "devDependencies": { "prismjs": "^1.27.0" diff --git a/packages/markdown/remark/src/remark-prism.ts b/packages/markdown/remark/src/remark-prism.ts index 549e09783f..6d3e4e6640 100644 --- a/packages/markdown/remark/src/remark-prism.ts +++ b/packages/markdown/remark/src/remark-prism.ts @@ -1,6 +1,6 @@ import { visit } from 'unist-util-visit'; import Prism from 'prismjs'; -import { addAstro } from '@astrojs/prism'; +import { addAstro } from '@astrojs/prism/internal'; import loadLanguages from 'prismjs/components/index.js'; const noVisit = new Set(['root', 'html', 'text']);