@timvir/mdx 0.2.45 → 0.2.46

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @timvir/mdx
2
2
 
3
+ ## 0.2.46
4
+
5
+ ### Patch Changes
6
+
7
+ - **Generate relative import paths in remark plugin** ([`2d332f9`](https://github.com/timvir/timvir/commit/2d332f9936e4827d0914829a65936f2dfec2486a)) - Turbopack (enabled by default in Next.js v16) does not support absolute import paths. Not even if the files themselves are inside the workspace. The remark plugin will now generate relative import paths.
8
+
3
9
  ## 0.2.45
4
10
 
5
11
  ## 0.2.44
package/index.js CHANGED
@@ -34,13 +34,15 @@ export function remarkPlugin() {
34
34
  /*
35
35
  * The module which holds the sample.
36
36
  */
37
- const module = path.join(path.dirname(filename), component, "samples", variant);
37
+ const module = path.join(component, "samples", variant);
38
38
 
39
39
  function loadSource() {
40
- if (fs.existsSync(module)) {
41
- return fs.readFileSync(module, "utf8");
40
+ const absoluteModulePath = path.join(path.dirname(filename), module);
41
+
42
+ if (fs.existsSync(absoluteModulePath)) {
43
+ return fs.readFileSync(absoluteModulePath, "utf8");
42
44
  } else {
43
- return fs.readFileSync(`${module}.tsx`, "utf8");
45
+ return fs.readFileSync(`${absoluteModulePath}.tsx`, "utf8");
44
46
  }
45
47
  }
46
48
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@timvir/mdx",
4
- "version": "0.2.45",
4
+ "version": "0.2.46",
5
5
  "license": "MIT",
6
6
  "sideEffects": false,
7
7
  "exports": {