Using the example of one of the manuals, I created a procurement for React + Redux - https://github.com/keslo/React-Redux-environment

Downloading. Install packages via npm install launch the project via npm start Everything works.

But!

The assembly file in the project folder does not appear. Although at the address after running localhost:3000/static/bundle.js build is present. But there is no location directory and file in the project folder.

What am I doing wrong?

    1 answer 1

    Because it is created in a virtual directory and thrown away by the webpack. In order for your files to appear, you need to run the webpack command, then, using the settings of webpack.config.js , you will create the files you need.

    What happens is the right behavior. Do not worry.

    Ps. If the webpack command in the main directory is not called install it globally npm i -g webpack

    An example of what the webpack will issue webpack :

     > reactjs@1.0.0 webpack-dev \Core\core2\core\gui\web\navigator > webpack --config=./.config/webpack-dev.config Compile navigator development Hash: da962bf7ff67ea98b366 Version: webpack 1.12.15 Time: 5873ms Asset Size Chunks Chunk Names navigator.debug.js 202 kB 0 [emitted] bundle + 68 hidden modules 
    • Thank you, kind man! - Anton K.
    • And such a question. I have a JSON data file in the static directory. In the same place where the assembly. What will the link in XmlHttpRequest look like to access it? To correlate this I began to look for the assembly file. - Anton K.
    • @AntonK. wherever the assembly is thrown away, it seems that you have this static folder, create it, upload files there, they should be available - Vasily Barbashev