Create-react-app: Feature: support different build folder

Created on 27 Sep 2016  路  4Comments  路  Source: facebook/create-react-app

I wonder if its possible to customise the build folder to be named www so create-react-app could be used with Cordova. Cordova expects all assets to be in ./www.

Most helpful comment

Usage in Cordova apps

{
  "homepage": "../www/",
  "scripts": {
    "build": "react-scripts build && cp -r ./build/* ./www",
  }
}

With that it works!

All 4 comments

Please see https://github.com/facebookincubator/create-react-app/issues/778. This is easy to achieve by adding an explicit copy command so we are unlikely to make this configurable.

You are right. Didn't see that already asked here.

Usage in Cordova apps

{
  "homepage": "../www/",
  "scripts": {
    "build": "react-scripts build && cp -r ./build/* ./www",
  }
}

With that it works!

This build line works in Windows
"build": "react-scripts build && robocopy ./build ./www /mir",

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Evan-GK picture Evan-GK  路  3Comments

fson picture fson  路  3Comments

fson picture fson  路  3Comments

ap13p picture ap13p  路  3Comments

AlexeyRyashencev picture AlexeyRyashencev  路  3Comments