ReduxSimpleStarter icon indicating copy to clipboard operation
ReduxSimpleStarter copied to clipboard

NPM RUN BUILD NOT FUNCTION!!

Open Pognio10 opened this issue 7 years ago • 3 comments

Hi! i have use this repo for the base of my project, but i need to create a build script, i have import the react-script in my project and in the package.json in the scripts section i have write: "build": "react-scripts build"

but i have this errors: schermata 2017-11-30 alle 11 46 53

any have a solution??

Pognio10 avatar Nov 30 '17 10:11 Pognio10

any updates?

oilgraphy avatar Jan 16 '18 22:01 oilgraphy

Right now, ReduxSimpleStarter doesn't support npm build, and it's created for educational purpose. If you want to quickly create and run React applications with no configuration, you can use create-react-app instead.

To manually build with ReduxSimpleStarter, run the command webpack -p to generate a complete "/bundle.js" that contains all the code for your application, then copy that file including your "/index.html" and "/style" into a single "/build" folder, that folder will be your compiled product.

Here is my example: https://github.com/5ervant/simple-blogging-application/tree/master/docs And its live preview: https://5ervant.github.io/simple-blogging-application/

5ervant avatar Jan 17 '18 03:01 5ervant

Thanks, the above steps work for me. I run node_modules/webpack/bin/webpack.js -p

The only thing I need to update is to remove leading '/' from "/bundle.js" and "/style/style.css" in index.html, because I deploy the app in a sub-folder of web root.

oilgraphy avatar Jan 17 '18 10:01 oilgraphy