mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-05 05:42:44 +08:00
* chore(eslint-config): update dependencies, test cases * chore: update file .lock * fix: wrong .lock file * fix: code style * chore: update `eslint-plugin-vue`
14 lines
514 B
JavaScript
14 lines
514 B
JavaScript
// https://github.com/facebook/jest/issues/9771#issuecomment-871585234
|
|
const resolver = require('enhanced-resolve').create.sync({
|
|
conditionNames: ['require', 'node', 'default'],
|
|
extensions: ['.js', '.json', '.node', '.ts', '.tsx'],
|
|
});
|
|
|
|
module.exports = function (request, options) {
|
|
// list global module that must be resolved by defaultResolver here
|
|
if (['fs', 'http', 'path'].includes(request)) {
|
|
return options.defaultResolver(request, options);
|
|
}
|
|
return resolver(options.basedir, request);
|
|
};
|