Skip to content

Commit acd98e7

Browse files
committed
chore(zod2md-jsdocs): test importing with .js extension in Nx plugin
1 parent 3dbf378 commit acd98e7

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

.env.local

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
NODE_OPTIONS=--import tsx
2+
TSX_TSCONFIG_PATH=tsconfig.base.json
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export const ZOD2MD_CONFIG_FILE = 'zod2md.config.ts';
2+
export const GENERATE_DOCS_TARGET_NAME = 'generate-docs';

tools/zod2md-jsdocs/src/nx-plugin.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import type { CreateNodesV2, NxPlugin, TargetConfiguration } from '@nx/devkit';
22
import * as path from 'node:path';
3-
4-
const ZOD2MD_CONFIG_FILE = 'zod2md.config.ts';
5-
const GENERATE_DOCS_TARGET_NAME = 'generate-docs';
3+
// this would break without setting node loader in .env.local
4+
import { GENERATE_DOCS_TARGET_NAME, ZOD2MD_CONFIG_FILE } from './constants.js';
65

76
type DocsTargetConfigParams = {
87
config: string;

0 commit comments

Comments
 (0)