No build directory


Topic: No build directory

arooly pro asked 7 years ago

I run "yarn build" on pro and general version and is not creating a build directory. What is my mistake? Both are running and compiling without error.

Jakub Strebeyko staff answered 7 years ago

Hi there arooly,

What you are getting from running the build script depends on the project's package.json file. If you are running a plain version of downloaded MDB React App, then the script is actually not for creating a "build directory", but enhancing the existent dist/ directory with the project's JS content compiled into an mdbreact.js file, meaning that what MDB React is, is taken, recompiled and put there anew.

The situation is different when running yarn build in a project, say, created with CRA (create-react-app myapp) - there the building script is handled by a scripting utility called react-scripts, which is optimized to support a rapid development and deployment process (please refer to node_modules/react-scripts/scripts/build.js in your create-react-app created project for details). In that case, it indeed creates a build/ directory, where your whole project should be compiled.

In case you are applying MDB React to an existent project that came to being somehow differently, please refer to the package.json file to see what exactly should happen after typing yarn build.

With Best Regards,
Kuba


arooly pro commented 7 years ago

Thank's Jakub

Jakub Strebeyko staff commented 7 years ago

The pleasure is mine! In case of other questions, the MDB Support Board is here for you.

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB React
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No