S
S
Serghei QED2022-01-19 23:45:12
React
Serghei QED, 2022-01-19 23:45:12

Why doesn't the yarn build command work in react?

Why are the files in the dist folder not being built when using yarn build?
And how to optimize tailwind so that it does not load everything. But only what is used

Link to rep .:
https://github.com/obj-QED/Tailwind_Sass_Webpack

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2022-01-20
@slide13

Wang that you have windows. In package.json change line 35 to:

"build": "SET NODE_ENV=production & webpack --config config/webpack.prod.js",

You have a build command under linux written, for Windows you need commands through & separate + the environment variable is networked differently
In this case, if you have different OSes, you can use the cross-env package so that you do not have to edit anything manually

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question