Skip to content

Commit

Permalink
Merge pull request #66 from forksss/main
Browse files Browse the repository at this point in the history
fix: support nextjs 13 (fix #65)
  • Loading branch information
timlrx authored Aug 7, 2023
2 parents d8582ab + 6dab3df commit fdeaa63
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
6 changes: 0 additions & 6 deletions index.js

This file was deleted.

26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@
"files": [
"dist"
],
"main": "./dist/rehype-prism-plus.es.js",
"module": "./dist/rehype-prism-plus.es.js",
"main": "./dist/index.es.js",
"module": "./dist/index.es.js",
"types": "./dist/index.d.ts",
"type": "module",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/rehype-prism-plus.es.js"
"default": "./dist/index.es.js"
},
"./common": {
"types": "./dist/src/common.d.ts",
"import": "./dist/common.es.js"
"types": "./dist/common.d.ts",
"default": "./dist/common.es.js"
},
"./all": {
"types": "./dist/src/all.d.ts",
"import": "./dist/all.es.js"
"types": "./dist/all.d.ts",
"default": "./dist/all.es.js"
},
"./generator": {
"types": "./dist/src/generator.d.ts",
"import": "./dist/generator.es.js"
"types": "./dist/generator.d.ts",
"default": "./dist/generator.es.js"
}
},
"typesVersions": {
Expand All @@ -34,18 +34,18 @@
"./dist/index"
],
"common": [
"./dist/src/common"
"./dist/common"
],
"all": [
"./dist/src/all"
"./dist/all"
],
"generator": [
"./dist/src/generator"
"./dist/generator"
]
}
},
"scripts": {
"build": "tsc -b && microbundle index.js src/common.js src/all.js src/generator.js --format esm",
"build": "tsc -b && microbundle src/index.js src/common.js src/all.js src/generator.js --format esm",
"tsc": "tsc --watch",
"lint": "eslint .",
"prettier": "prettier --write '*.js'",
Expand Down
6 changes: 6 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import rehypePrismGenerator from './generator.js'
import rehypePrismCommon from './common.js'
import rehypePrism from './all.js'

export { rehypePrismGenerator, rehypePrismCommon }
export default rehypePrism
2 changes: 1 addition & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import remarkParse from 'remark-parse'
import remarkRehype from 'remark-rehype'
import rehypeStringify from 'rehype-stringify'
import dedent from 'dedent'
import rehypePrism from './index.js'
import rehypePrism from './src/index.js'

/**
* Mock meta in code block
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"include": ["index.js", "src/*"],
"include": ["src/*"],
"compilerOptions": {
"target": "ES2020",
"lib": ["ES2020"],
Expand Down

0 comments on commit fdeaa63

Please sign in to comment.