Created by: Jiansen
-
separate dev config and prod config, including paths.js - part of #191
-
cleanup code on eject - same as in #206 , can close 206 if this PR is accepted.
- as discussed in #206, the
--smoke-test
tag is kept in production code for now
-
on release, only ship configurations for production code - in the node_module installed at users side, there will be no
--debug-template
flag
- in the node_module installed at users side, there will be no
-
same as above, in e2e
test, when testing cli, only pack production code -
on local dev (i.e. build and start), use dev configuration
Disscussion 1: add parameter stage
to pack.sh so that
- pack.sh prod only ship prod configurations
- pack.sh dev only ship dev configurations
- pack.sh test only ship test configurations
- etc.
This can be done by removing files
in package.json, and creating a few versions of .npmignore files (e.g. .npmignore.prod).
Disscussion 2: further split paths.prod.js to 2 files, paths.beforeEject.js and paths.afterEject.js; remove the // Dead code on eject:start/end
block.
Question: start.js always use the dev config for webpack. Is there a reason for this? In my local test, it seems fine to use production config in a generated app.