-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: postcss config
.cts
support (#14660)
- Loading branch information
1 parent
6ebac4c
commit e5ee420
Showing
4 changed files
with
49 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,7 +119,8 @@ | |
"patchedDependencies": { | ||
"[email protected]": "patches/[email protected]", | ||
"[email protected]": "patches/[email protected]", | ||
"[email protected]": "patches/[email protected]" | ||
"[email protected]": "patches/[email protected]", | ||
"[email protected]": "patches/[email protected]" | ||
}, | ||
"peerDependencyRules": { | ||
"allowedVersions": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
diff --git a/src/index.js b/src/index.js | ||
index a7d16703a96a1229381beef905287192db332332..53a29ba20c7826caefc18bc0e786493a6ffcf978 100644 | ||
--- a/src/index.js | ||
+++ b/src/index.js | ||
@@ -85,10 +85,12 @@ const addTypeScriptLoader = (options = {}, loader) => { | ||
`.${moduleName}rc.yaml`, | ||
`.${moduleName}rc.yml`, | ||
`.${moduleName}rc.ts`, | ||
+ `.${moduleName}rc.cts`, | ||
`.${moduleName}rc.js`, | ||
`.${moduleName}rc.cjs`, | ||
`.${moduleName}rc.mjs`, | ||
`${moduleName}.config.ts`, | ||
+ `${moduleName}.config.cts`, | ||
`${moduleName}.config.js`, | ||
`${moduleName}.config.cjs`, | ||
`${moduleName}.config.mjs` | ||
@@ -100,7 +102,8 @@ const addTypeScriptLoader = (options = {}, loader) => { | ||
'.js': importDefault, | ||
'.cjs': importDefault, | ||
'.mjs': importDefault, | ||
- '.ts': loader | ||
+ '.ts': loader, | ||
+ '.cts': loader | ||
} | ||
} | ||
} | ||
@@ -112,7 +115,9 @@ const withTypeScriptLoader = (rcFunc) => { | ||
|
||
try { | ||
// Register TypeScript compiler instance | ||
- registerer = require('ts-node').register() | ||
+ registerer = require('ts-node').register({ | ||
+ moduleTypes: { '**/*.cts': 'cjs' } | ||
+ }) | ||
|
||
return require(configFile) | ||
} catch (err) { |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.