Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit 981f773

Browse files
committed
fix: Use nodenext module and module resolution
1 parent 011a48a commit 981f773

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

src/common/parse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { VARIANT_ATRULE_PATTERN } from './constants';
1+
import { VARIANT_ATRULE_PATTERN } from './constants.js';
22

33
function deamp(selector: string) {
44
const trimmed = selector.trim();

src/postcss/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { readFileSync } from 'fs';
22
import { PluginCreator } from 'postcss';
3-
import { VARIANT_SELECTOR_PATTERN } from '../common/constants';
4-
import { createVariantsSelectors } from '../common/parse';
3+
import { VARIANT_SELECTOR_PATTERN } from '../common/constants.js';
4+
import { createVariantsSelectors } from '../common/parse.js';
55

66
/**
77
* Use your custom tailwind variants as selectors inside css files without relying on the `@apply`

src/vite/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import {
66
CSS_FILE_PATTERN,
77
CSS_IMPORT_PATTERN,
88
VARIANT_SELECTOR_PATTERN
9-
} from '../common/constants';
10-
import { createVariantsSelectors } from '../common/parse';
9+
} from '../common/constants.js';
10+
import { createVariantsSelectors } from '../common/parse.js';
1111

1212
/**
1313
* Use your custom tailwind variants as selectors inside css files without relying on the `@apply`

tsconfig.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
"target": "ESNext",
88
"strict": true,
99
"outDir": "dist",
10-
"moduleResolution": "bundler",
10+
"moduleResolution": "nodenext",
1111
"declarationMap": true,
12-
"sourceMap": true
12+
"sourceMap": true,
13+
"module": "NodeNext",
14+
"resolveJsonModule": true
1315
},
1416
"include": ["src/**/*.ts"]
1517
}

0 commit comments

Comments
 (0)