Skip to content

Comments

修正 babel 找不到 preset 的问题#5

Open
imyelo wants to merge 1 commit intodouzi8:masterfrom
imyelo:babel-preset
Open

修正 babel 找不到 preset 的问题#5
imyelo wants to merge 1 commit intodouzi8:masterfrom
imyelo:babel-preset

Conversation

@imyelo
Copy link

@imyelo imyelo commented Dec 21, 2018

fixes #2 .
不仅是 windows 下会存在问题,只要是以全局包的形式 (npm i -g wx-alipay) 使用 wxToalipay 都会使 babel 在 cwd 寻找 preset,导致出现 Couldn't find preset "es2015" relative to directory 的异常。

presets 中的字符串替换为 require.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

Successfully merging this pull request may close these issues.

windows平台解决Couldn't find preset "es2015" relative to directory

1 participant