Coder Social home page Coder Social logo

Love Ant.D! about rekit HOT 8 CLOSED

supnate avatar supnate commented on July 28, 2024
Love Ant.D!

from rekit.

Comments (8)

supnate avatar supnate commented on July 28, 2024

Thanks @loganpowell :) I'm also indeed a And.D fan.

from rekit.

loganpowell avatar loganpowell commented on July 28, 2024

Thought so! Any tips/advice for how best to use ant.d with Rekit? Should we follow the Use in create-react-app workflow/process?

from rekit.

loganpowell avatar loganpowell commented on July 28, 2024

No dice on incorporation of ant.d?

from rekit.

supnate avatar supnate commented on July 28, 2024

Oh, sorry @loganpowell , I thought I answered your question.
Actually a Rekit app is just a normal React project, no special config needed. You can just follow the guide on https://ant.design/docs/react/getting-started . Or you can also refer to Rekit portal for the usage.

from rekit.

loganpowell avatar loganpowell commented on July 28, 2024

Great. So, just update the webpack.test.config.js file or the webpack-config.js file?

from rekit.

loganpowell avatar loganpowell commented on July 28, 2024

Also, following this tutorial (step 4) it looks like webpack-config.js is using webpack1 syntax... should I be using that? I.e.:

// webpack*.config.js
const path = require('path');
const fs  = require('fs');

const lessToJs = require('less-vars-to-js');
const themeVariables = lessToJs(fs.readFileSync(path.join(__dirname, './ant-theme-vars.less'), 'utf8'));
...
// webpack2.config.js
module: {
  rules: [
    ...
    {
      test: /\.less$/,
      use: [
        {loader: "style-loader"},
        {loader: "css-loader"},
        {loader: "less-loader",
          options: {
            modifyVars: themeVariables
          }
        }
      ]
    }
  ]
}
//webpack1.config.js
module: {
  loaders: [
    {
      test: /\.less$/,
      loader: 'style-loader!css-loader!less-loader',
      query: {
        modifyVars: themeVariables
      }
    },
  ...
  ]
}

from rekit.

fgiarritiello avatar fgiarritiello commented on July 28, 2024

HI, has anyone added antd to rekit?

Amazing work BTW.

from rekit.

supnate avatar supnate commented on July 28, 2024

@fgiarritiello Since Rekit app is based on create-react-app, you can follow https://ant.design/docs/react/use-with-create-react-app to add antd to a Rekit project. The only thing you need to be aware of is enable javascript for less-loader if you want to compile antd style locally:

{
            test: /\.less$/,
            use: [
              {
                loader: 'style-loader',
              },
              {
                loader: 'css-loader',
                options: { sourceMap: true },
              },
              {
                loader: 'less-loader',
                options: { sourceMap: true, javascriptEnabled: true },
              },
            ],
          },

As I know antd is widely used in Rekit projects.

from rekit.

Related Issues (20)

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.