@d1vij/react-mdx-loader 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,8 @@
1
1
  import { Options as MDXOptions } from "@mdx-js/rollup";
2
2
  import { Plugin } from "vite";
3
- type MDXLoaderPluginOptions = {
4
- mdxPluginOptions?: MDXOptions;
5
- };
6
3
  /**
7
4
  * Vite plugin to support MDX conversion.
8
5
  * Users wont have to explicitly setup their vite config
9
6
  */
10
- declare function MDXLoaderPlugin({ mdxPluginOptions }: MDXLoaderPluginOptions): Plugin;
7
+ declare function MDXLoaderPlugin(opts?: MDXOptions): Plugin;
11
8
  export { MDXLoaderPlugin };
@@ -1,18 +1,7 @@
1
1
  // src/vitePlugin.ts
2
2
  import mdx from "@mdx-js/rollup";
3
- function MDXLoaderPlugin({
4
- mdxPluginOptions
5
- }) {
6
- return {
7
- name: "react-mdx-loader-plugin",
8
- enforce: "pre",
9
- config(c) {
10
- return {
11
- ...c,
12
- plugins: [mdx(mdxPluginOptions)]
13
- };
14
- }
15
- };
3
+ function MDXLoaderPlugin(opts) {
4
+ return mdx(opts);
16
5
  }
17
6
  export {
18
7
  MDXLoaderPlugin
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@d1vij/react-mdx-loader",
3
3
  "description": "Supporting lib to create content driven sites using MDX",
4
- "version": "0.1.3",
4
+ "version": "0.1.4",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"
@@ -16,7 +16,8 @@
16
16
  }
17
17
  },
18
18
  "./plugin": {
19
- "import": "./dist/plugin.js"
19
+ "import": "./dist/vitePlugin.js",
20
+ "types": "./dist/vitePlugin.d.ts"
20
21
  },
21
22
  "./package.json": "./package.json"
22
23
  },