Skip to content

Commit

Permalink
test: update dynamicImport util
Browse files Browse the repository at this point in the history
  • Loading branch information
Nate Moore committed Oct 12, 2021
1 parent 9c0cb0e commit 756f77c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -578,4 +578,4 @@ export const singlelineCommentsRE = /\/\/.*/g
*
* @param file File path to import.
*/
export const dynamicImport = typeof jest === 'undefined' ? new Function('file', 'return import(file)') : new Function('require', 'file', 'return require(file)').bind(null, require)
export const dynamicImport = typeof jest === 'undefined' ? new Function('file', 'return import(file)') : require;

0 comments on commit 756f77c

Please sign in to comment.