File tree 2 files changed +2
-9
lines changed
2 files changed +2
-9
lines changed Original file line number Diff line number Diff line change 1
1
import path from 'path' ;
2
2
import findup from 'findup-sync' ;
3
- import esm from 'esm' ;
4
-
5
- const esmRequire = esm ( module ) ;
6
3
7
4
interface LoadBrocfileOptions {
8
5
brocfilePath ?: string ;
@@ -37,8 +34,7 @@ function requireBrocfile(brocfilePath: string) {
37
34
// Load brocfile via ts-node
38
35
brocfile = require ( brocfilePath ) ;
39
36
} else {
40
- // Load brocfile via esm shim
41
- brocfile = esmRequire ( brocfilePath ) ;
37
+ brocfile = require ( brocfilePath ) ;
42
38
}
43
39
44
40
// ESM `export default X` is represented as module.exports = { default: X }
Original file line number Diff line number Diff line change 1
1
import loadBrocfile from '../lib/load_brocfile' ;
2
2
import BroccoliSource from 'broccoli-source' ;
3
3
import chai from 'chai' ;
4
- import esm from 'esm' ;
5
-
6
- const esmRequire = esm ( module ) ;
7
4
8
5
const projectPath = 'test/fixtures/project' ;
9
6
const projectPathEsm = 'test/fixtures/project-esm' ;
@@ -13,7 +10,7 @@ const projectPathTsConfig = 'test/fixtures/project-ts-tsconfig';
13
10
const brocfileFixture = require ( '../' + projectPath + '/Brocfile.js' ) ;
14
11
// eslint-disable-next-line @typescript-eslint/no-var-requires
15
12
const brocfileFunctionFixture = require ( '../' + projectPath + '/Brocfile-Function.js' ) ;
16
- const brocfileEsmFixture = esmRequire ( '../' + projectPathEsm + '/Brocfile.js' ) ;
13
+ const brocfileEsmFixture = require ( '../' + projectPathEsm + '/Brocfile.js' ) ;
17
14
18
15
describe ( 'loadBrocfile' , function ( ) {
19
16
let oldCwd = null ;
You can’t perform that action at this time.
0 commit comments