File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -84,15 +84,6 @@ async function getPackageType(url) {
84
84
return dir . length > 1 && getPackageType ( resolvePath ( dir , '..' ) ) ;
85
85
}
86
86
87
-
88
- // Register CoffeeScript to also transform CommonJS files. This can more
89
- // thoroughly be done for CoffeeScript specifically via
90
- // `CoffeeScript.register()`, but for purposes of this example this is the
91
- // simplest method.
87
+ // Register CoffeeScript to also transform CommonJS files.
92
88
const require = createRequire ( import . meta. url ) ;
93
- [ '.coffee' , '.litcoffee' , '.coffee.md' ] . forEach ( extension => {
94
- require . extensions [ extension ] = ( module , filename ) => {
95
- const source = readFileSync ( filename , 'utf8' ) ;
96
- return module . _compile ( coffeeCompile ( source , filename ) , filename ) ;
97
- }
98
- } )
89
+ require ( "coffeescript/register" )
You can’t perform that action at this time.
0 commit comments