Babel file is copied without being transformed

前端 未结 10 2163
礼貌的吻别
礼貌的吻别 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 06:49

    npm install --save-dev babel-preset-node5
    
    npm install --save-dev babel-preset-react
    

    ...and then creating a .babelrc with the presets:

    {
      "presets": [
        "node5",
        "react"
      ]
    }
    

    ...resolved a very similar issue for me, with babel 3.8.6, and node v5.10.1

    https://www.npmjs.com/package/babel-preset-node5
    https://www.npmjs.com/package/babel-preset-react

提交回复
热议问题