Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能否更新下entry 包,加下处理 #309

Open
sanriqing opened this issue Mar 19, 2020 · 3 comments
Open

能否更新下entry 包,加下处理 #309

sanriqing opened this issue Mar 19, 2020 · 3 comments

Comments

@sanriqing
Copy link

const matchPath = function (p) {
const files = [path.resolve(src/${p}.js), path.resolve(src/${p}.vue),path.resolve(src/${p}/index.js),path.resolve(src/${p}/index.vue)]
for(const filePath of files){
if(fs.existsSync(filePath)){
return filePath
}
}
return false
}

增加下文件夹下index 的文件的处理

@sanriqing
Copy link
Author

使用 enhanced-resolve 来处理就更好了。。

@bigmeow
Copy link

bigmeow commented Mar 31, 2020

@sanriqing 需求的目的?

@sanriqing
Copy link
Author

@sanriqing 需求的目的?

老项目都是直接没有指向具体index的。。而且这样更符合resolve的标准实现

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants