Skip to content

Commit 6abaadd

Browse files
committed
Adapt examples
1 parent 4be8a20 commit 6abaadd

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

examples/contentlayer/pages/_app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import "@code-hike/mdx/dist/index.css"
1+
import "@code-hike/mdx/styles"
22

33
function MyApp({ Component, pageProps }) {
44
return <Component {...pageProps} />

examples/mdx-bundler/pages/_app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import "@code-hike/mdx/dist/index.css"
1+
import "@code-hike/mdx/styles"
22

33
function MyApp({ Component, pageProps }) {
44
return <Component {...pageProps} />

examples/mdx-bundler/pages/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import fs from "fs"
44
import path from "path"
55
import { bundleMDX } from "mdx-bundler"
66
import { getMDXComponent } from "mdx-bundler/client"
7-
import { useMemo } from "react"
87

98
export async function getStaticProps() {
109
// can be from a local file, database, anywhere

examples/nextjs/pages/_app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import "@code-hike/mdx/dist/index.css"
1+
import "@code-hike/mdx/styles"
22

33
function MyApp({ Component, pageProps }) {
44
return <Component {...pageProps} />

examples/nextra/pages/_app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import "nextra-theme-docs/style.css"
2-
import "@code-hike/mdx/dist/index.css"
2+
import "@code-hike/mdx/styles"
33

44
export default function Nextra({ Component, pageProps }) {
55
return <Component {...pageProps} />

examples/remix/app/root.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
Scripts,
77
ScrollRestoration
88
} from "remix";
9-
import codeHikeStyles from "@code-hike/mdx/dist/index.css";
9+
import codeHikeStyles from "@code-hike/mdx/styles.css";
1010

1111
export function meta() {
1212
return { title: "New Remix App" };

examples/vite/src/App.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '@code-hike/mdx/dist/index.css'
1+
import '@code-hike/mdx/styles'
22
import Content from './hello.mdx'
33

44
function App() {

packages/mdx/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
},
1616
"./components": {
1717
"import": "./dist/components.esm.js",
18-
"require": "./dist/components.cjs.js"
18+
"require": "./dist/components.cjs.js",
19+
"default": "./dist/components.cjs.js"
1920
},
2021
"./package.json": "./package.json",
2122
"./styles": "./dist/index.css",

packages/mdx/src/mdx-plugin/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function remarkCodeHike(
2626
visit(tree, "mdxjsEsm", (node: EsmNode) => {
2727
if (
2828
node.value.startsWith(
29-
`import { CH } from "@code-hike/mdx"`
29+
`import { CH } from "@code-hike/mdx`
3030
)
3131
) {
3232
hasCodeHikeImport = true

0 commit comments

Comments
 (0)