refactor: move Prism comp to default exp (#2887)
This commit is contained in:
parent
7c39389a3f
commit
046bf7281f
6 changed files with 7 additions and 9 deletions
|
@ -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 {
|
1
packages/astro-prism/index.js
Normal file
1
packages/astro-prism/index.js
Normal file
|
@ -0,0 +1 @@
|
|||
export { default as Prism } from './Prism.astro';
|
|
@ -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"
|
||||
|
|
|
@ -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']);
|
||||
|
||||
|
|
Loading…
Reference in a new issue