Closed
Bug 1507906
Opened 6 years ago
Closed 5 years ago
Remove react-hot-loader leftovers from production bundles
Categories
(Tree Management :: Treeherder: Frontend, enhancement, P1)
Tree Management
Treeherder: Frontend
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: emorley, Assigned: emorley)
References
Details
Whilst RHL is mostly a no-op in production, the way it's meant to be used in v4 leaves a few traces behind. This has been fixed in newer react-hot-loader, though also needs a one-line change in Neutrino to take advantage of it. These leftovers include a usage of `eval()` - which is only included as a check for eval-support, but results in a CSP false positive, so blocks bug 1270157. Also, whilst the leftovers are tiny in size, they prevent another webpack 4 optimisation from taking place (concatenate modules). See: https://github.com/gaearon/react-hot-loader/issues/1080 https://github.com/gaearon/react-hot-loader/issues/1095 I'll fix upstream in Neutrino and then update us to newer Neutrino and newer RHL.
Assignee | ||
Comment 1•6 years ago
|
||
Fixes Neutrino side: https://github.com/neutrinojs/neutrino/pull/1213 https://github.com/mozilla/treeherder/pull/4314
Comment 2•6 years ago
|
||
Commit pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/a4be2c54e50a66ae483be4b0549b5e84c00f588f Update Neutrino to 9.0.0-rc.0 (#4314) * React prop-types are now stripped from the bundle in production (since they are only used by React in development), reducing bundle size. * react-hot-loader's Babel plugin is now enabled in production too, which is the first piece for fixing bug 1507906. * `@neutrinojs/eslint` now configures `emitWarning` itself, so our customising is no longer required. * `@neutrinojs/devServer` now enabled `overlay` itself, so we do not need to do so manually. Full changelog: https://github.com/neutrinojs/neutrino/compare/1c082ac...e9c21b8
Assignee | ||
Comment 3•5 years ago
|
||
Waiting on a new stable release of RHL that includes the upstream fixes we need.
Assignee | ||
Comment 4•5 years ago
|
||
(In reply to Ed Morley (Away until 2nd Jan) [:emorley] from comment #3) > Waiting on a new stable release of RHL that includes the upstream fixes we need. https://github.com/mozilla/treeherder/pull/4374
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•