Babel file is copied without being transformed

前端 未结 10 2152
礼貌的吻别
礼貌的吻别 2020-11-22 06:09

I have this code:

\"use strict\";

import browserSync from \"browser-sync\";
import httpProxy from \"http-proxy\";

let proxy = httpProxy.createProxyServer({         


        
10条回答
  •  囚心锁ツ
    2020-11-22 07:02

    I had the same problem with a different cause:

    The code I was trying to load was not under the package directory, and Babel does not default to transpiling outside the package directory.

    I solved it by moving the imported code, but perhaps I could have also used some inclusion statement in the Babel configuration.

提交回复
热议问题