File tree Expand file tree Collapse file tree 3 files changed +3
-24
lines changed Expand file tree Collapse file tree 3 files changed +3
-24
lines changed Original file line number Diff line number Diff line change 8484 "postcss-load-config" : " ^4.0.2 || ^5.0 || ^6.0" ,
8585 "postcss-nested" : " ^6.2.0" ,
8686 "postcss-selector-parser" : " ^6.1.2" ,
87- "resolve" : " ^1.22.8" ,
88- "sucrase" : " ^3.35.0"
87+ "resolve" : " ^1.22.8"
8988 },
9089 "browserslist" : [
9190 " > 1%" ,
Original file line number Diff line number Diff line change 11import jitiFactory from 'jiti'
2- import { transform } from 'sucrase'
32
43import { Config } from '../../types/config'
54
@@ -17,16 +16,7 @@ function lazyJiti() {
1716 jiti ??
1817 ( jiti = jitiFactory ( __filename , {
1918 interopDefault : true ,
20- transform : ( opts ) => {
21- // Sucrase can't transform import.meta so we have to use Babel
22- if ( opts . source . includes ( 'import.meta' ) ) {
23- return require ( 'jiti/dist/babel.js' ) ( opts )
24- }
25-
26- return transform ( opts . source , {
27- transforms : [ 'typescript' , 'imports' ] ,
28- } )
29- } ,
19+ transform : ( opts ) => require ( 'jiti/dist/babel.js' ) ( opts ) ,
3020 } ) )
3121 )
3222}
Original file line number Diff line number Diff line change @@ -31,22 +31,12 @@ let localModules = {
3131// Swap out the default JITI implementation with one that has the built-in modules above preloaded as "native modules"
3232// NOTE: This uses a private, internal API of Tailwind CSS and is subject to change at any time
3333let { useCustomJiti } = require ( 'tailwindcss/lib/lib/load-config' )
34- let { transform } = require ( 'sucrase' )
3534
3635useCustomJiti ( ( ) =>
3736 require ( 'jiti' ) ( __filename , {
3837 interopDefault : true ,
3938 nativeModules : Object . keys ( localModules ) ,
40- transform : ( opts ) => {
41- // Sucrase can't transform import.meta so we have to use Babel
42- if ( opts . source . includes ( 'import.meta' ) ) {
43- return require ( 'jiti/dist/babel.js' ) ( opts )
44- }
45-
46- return transform ( opts . source , {
47- transforms : [ 'typescript' , 'imports' ] ,
48- } )
49- } ,
39+ transform : ( opts ) => require ( 'jiti/dist/babel.js' ) ( opts ) ,
5040 } )
5141)
5242
You can’t perform that action at this time.
0 commit comments