@putout/engine-loader 7.0.0 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/async-loader.js +1 -0
- package/lib/simple-import.js +4 -1
- package/package.json +1 -1
package/lib/async-loader.js
CHANGED
package/lib/simple-import.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
// How in other way to mock import using mock require in CommonJS?
|
|
4
|
-
module.exports.simpleImportDefault = async (url) =>
|
|
4
|
+
module.exports.simpleImportDefault = async (url) => {
|
|
5
|
+
const result = await import(url);
|
|
6
|
+
return result.default || result;
|
|
7
|
+
};
|
|
5
8
|
|
package/package.json
CHANGED