Skip to content

Commit

Permalink
fix non-standard esm usage by myself
Browse files Browse the repository at this point in the history
Closes #459
  • Loading branch information
kentcdodds committed Jun 30, 2023
1 parent c9b35b1 commit b251dd6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
8 changes: 6 additions & 2 deletions app/utils/compile-mdx.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,15 @@ function removePreContainerDivs() {

const remarkPlugins: U.PluggableList = [
[
remarkEmbedder,
remarkEmbedder.default,
{
handleError: handleEmbedderError,
handleHTML: handleEmbedderHtml,
transformers: [twitterTransformer, eggheadTransformer, oembedTransformer],
transformers: [
twitterTransformer,
eggheadTransformer,
oembedTransformer.default,
],
},
],
autoAffiliates,
Expand Down
11 changes: 0 additions & 11 deletions types/deps.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,6 @@
// their own type definitions and are not available on DefinitelyTyped.
// or which their exports are not compatible with ESM imports

declare module '@remark-embedder/core' {
import {type Plugin} from 'unified'
import {
type TransformerInfo,
type RemarkEmbedderOptions,
} from '@remark-embedder/core'
declare const remarkEmbedder: Plugin<[RemarkEmbedderOptions]>
export default remarkEmbedder
export {type TransformerInfo}
}

declare module 'md5-hash' {
import md5Hash from 'md5-hash'
const md5 = md5Hash as unknown as {
Expand Down

0 comments on commit b251dd6

Please sign in to comment.