Giter Site home page Giter Site logo

babel-plugin-import-fix's Issues

babel 7 似乎不支持了?

会出现错误
Error: This API has been removed. If you're looking for this functionality in Babel 7, you should import the '@babel/helper-module-imports' module and use the functions exposed from that module, such as 'addNamed' or 'addDefault'.

用户配置不覆盖默认配置

{
  "presets": [["env", { "modules": false }], "react"],
  "plugins": [
    "babel-plugin-transform-decorators-legacy",
    "transform-object-rest-spread",
    "transform-class-properties",
    ["import-fix", {
      "libraryName": "antd",
      "libraryPath": "antd/lib/${name}/index.js",
      "namePolicy": "dash",
      "cssPath": ""
    }]
  ]
}

我将 cssPath 置空,但是还是会按照默认配置进行读取,我看之前有人提了 issue,但还是存在这个问题?

在默认配置中的library, .babelrc自定义配置不生效

假设.babelrc文件是这样:

{
  "presets": [
    ["env", { "modules": false }]
  ],
  "plugins": [["import-fix", 
    [{
      "libraryName": "xcui",
      "libraryPath": "xcui/lib/${name}.js",
      "namePolicy": "dash",
      "cssPath": ["xcui/lib/less/components/common.less", "xcui/lib/less/components/${name}.less"]
    }]
  ]]
}

实际上还是加载lib/module-config中的配置,此配置没有生效。
应该要用户配置优先。
麻烦溪总修复~

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.