Skip to content

Summer-andy/react-loading-demand

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-loading-demand

npm version

this is a babel plugin for react-loading

🛎 how to use(如何使用)?

npm install --save-dev react-loading-demand

🛎 how to config(如何在你的项目中配置)

📕 方式1:

// .babelrc
{
  "plugins": [
    ["react-loading-demand", {"library": "react-loadingg"}]
  ]
}

// 配合 webpack 里的 babel-loader
module: {
  rules: [{
    test: /\.js$/,
    loader: "babel-loader",
  }]
},

📕 方式2:

module: {
  rules: [{
    test: /\.js$/,
    loader: "babel-loader",
+   options: {
+     plugins: [
+       ["react-loading-demand", { "library": "react-loadingg" }],
+     ]
+   }
  }]
},

or

module: {
  rules: [{
    test: /\.js$/,
    loader: "babel-loader",
+   options: {
+     plugins: [
+       [require('react-loading-demand'), { "library": "react-loadingg" }],
+     ]
+   }
  }]
},

🛎 how to Change(如何转化)

import { CommonLoading } from "react-loadingg";

🔨

import CommonLoading  from "react-loadingg/lib/CommonLoading";

About

this is a babel plugin for react-loading

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published