Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backpackify #39

Merged
merged 2 commits into from
Jan 9, 2019
Merged

Backpackify #39

merged 2 commits into from
Jan 9, 2019

Conversation

matthewdavidson
Copy link

@matthewdavidson matthewdavidson commented Dec 27, 2018

This PR upgrades backpack-react-scripts from CRA 1.X to CRA 2.X. When reviewing, it's useful to compare it to the diff in #40 which contains all the changes made to CRA 1.X for backpack-react-scripts.

Breaking changes:

See full list, the biggest being:

  1. Polyfills are no longer shipped by default.
  2. Vendor/common chunks enabled by default
    This has been reversed so that they are now opt in via enableAutomaticChunking
  3. The asset-manifest.json is useless now
    - asset-manifest.json generated by CRA2 is not useful facebook/create-react-app#5513
    - Static keys for vendor bundle in asset-manifest.json facebook/create-react-app#5225
    Worked around this by setting name in splitChunks: { chunks: 'all', name: false, }, to true.
    Also added css.html and js.html fragments to output folder to encapsulate script order.

Here is a list of things to test:

  • CSS modules
  • CSS modules class name collisions
  • SSR
  • lodash leaking to global scope
  • jsonpFunction
  • sassFunctions
  • npm run lint
  • "backpack-react-scripts" config:
    • crossOriginLoading
    • babelIncludePrefixes
    • disablePolyfills no longer required
    • amdExcludes
    • externals
    • ssrExternals
    • cssModules

@matthewdavidson matthewdavidson force-pushed the BPK-1801-brs-cra-2 branch 11 times, most recently from 6ed32b1 to a792e31 Compare January 2, 2019 14:59
@matthewdavidson matthewdavidson force-pushed the BPK-1801-brs-cra-2 branch 5 times, most recently from 263cea0 to 86bf1a9 Compare January 3, 2019 09:46
@matthewdavidson
Copy link
Author

Currently, the build is failing due to the following:

./src/index.js
Error: [BABEL] /tmp/tmp.ITFnhIWwCi/test-app/src/index.js: Cannot find module '@babel/plugin-transform-react-jsx' (While processing: "/tmp/tmp.ITFnhIWwCi/test-app/node_modules/babel-preset-react-app/index.js$1")
    at Array.reduce (<anonymous>)

This is the exact same failure that is happening on upstream/master: https://travis-ci.org/facebook/create-react-app/builds/474283066.

Related issue: facebook#6099

@matthewdavidson matthewdavidson force-pushed the BPK-1801-brs-cra-2 branch 6 times, most recently from f4e5341 to 8ec3b70 Compare January 7, 2019 09:47
@matthewdavidson matthewdavidson changed the base branch from master to new-fork January 7, 2019 09:48
@matthewdavidson matthewdavidson force-pushed the BPK-1801-brs-cra-2 branch 3 times, most recently from 901c4cf to 101eee2 Compare January 7, 2019 14:04
@matthewdavidson matthewdavidson force-pushed the BPK-1801-brs-cra-2 branch 3 times, most recently from cc0386e to 0158342 Compare January 9, 2019 12:16

Create React App works on macOS, Windows, and Linux.<br>
If something doesn’t work, please [file an issue](https://github.com/facebook/create-react-app/issues/new).
In order to benefit from the ongoing open source development of create-react-app, this fork is kept up-to-date with the upstream repo. To aid this, we have preserved the existing repo structure, including all of the source code for the other packages that live alongside [`react-scripts`](https://github.com/facebook/create-react-app/tree/master/packages/react-scripts). **We do not modify any source code outside of [`react-scripts`](https://github.com/facebook/create-react-app/tree/master/packages/react-scripts).**
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In order to benefit from the ongoing open source development of create-react-app, this fork is kept up-to-date with the upstream repo. To aid this, we have preserved the existing repo structure, including all of the source code for the other packages that live alongside [`react-scripts`](https://github.com/facebook/create-react-app/tree/master/packages/react-scripts). **We do not modify any source code outside of [`react-scripts`](https://github.com/facebook/create-react-app/tree/master/packages/react-scripts).**
In order to benefit from the ongoing open-source development of create-react-app, this fork is kept up-to-date with the upstream repo. To aid this, we have preserved the existing repo structure, including all of the source code for the other packages that live alongside [`react-scripts`](https://github.com/facebook/create-react-app/tree/master/packages/react-scripts). **We do not modify any source code outside of [`react-scripts`](https://github.com/facebook/create-react-app/tree/master/packages/react-scripts).**

packages/react-scripts/template/README.md Outdated Show resolved Hide resolved
packages/react-scripts/template/README.md Outdated Show resolved Hide resolved
packages/react-scripts/template/README.md Outdated Show resolved Hide resolved
packages/react-scripts/template/README.md Outdated Show resolved Hide resolved
Co-Authored-By: matthewdavidson <matthewdavidson@users.noreply.github.com>
@matthewdavidson matthewdavidson merged commit d934547 into new-fork Jan 9, 2019
@matthewdavidson matthewdavidson deleted the BPK-1801-brs-cra-2 branch January 9, 2019 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants