React scaffolding used less

  In combination with the recent react.js ants gold dress Ant Design Mobile applications do a single-page encountered a very difficult issue - that is,  react scaffolding does not support the less, saw a lot of good bloggers how to react scaffolding use less ,, feel cumbersome and because they can not solve practical problems, so figure it out myself after feeling so simple, so do a tutorial, to avoid the novice detours.

First, declare what I use Microsoft's code-editing software VS code, the following is a detailed graphic tutorials.

Preparation:

Command create-react-app react-demo React to create their own applications and can operate normally.

create-react-app react-demo

Here is how to react scaffolding support less graphic tutorials:

step1: to add your own workspaces to create a good project, if added to the workspace, skip this step.

step2: opening the project folder, and in turn find node_modules / react-scripts / config / webpack.config.js. The figure below the selected red box file that we need to modify.

step3 (key):

step4 (key):

step5 (key):

step6 (test):

 

Guess you like

Origin www.cnblogs.com/xiaojuziya/p/10990092.html
Recommended