-
Notifications
You must be signed in to change notification settings - Fork 0
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
HMR to DLL #26
HMR to DLL #26
Conversation
I want to create an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Judahmeek LGTM overall, but I'm not sure I what you mean by "create devtool
", can you elaborate?
if (builderConfig.deps === 'dll') { | ||
throw new Error('DLL manifest is missing. Run `yarn run build:dll`'); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you already checked it in webpack.config.babel.js
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. I pulled both setups from F&G, which I just double-checked. Ya'll have the same redundant check, btw.
Yeah, My bad. I originally thought that DLL was used during production & development. I know better now. However, I'm curious why DLL isn't used for Rspec integration testing. Are there incompatibility issues I should know of? |
@@ -0,0 +1,3 @@ | |||
// Webpack styles | |||
@import "vendor-client-bundle.css"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without the *.css
extension, SCSS was throwing an import error that vendor-client-bundle
either could not be found or was not valid SCSS. I'm assuming that it was trying to import vendor-client-bundle.js
, but since adding the extension worked, I didn't debug further.
'reselect', | ||
]; | ||
|
||
module.exports.dllExceptions = ['babel-polyfill']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
babel-polyfill is required even on Chrome for the regenerator-runtime
which is used by Redux-Saga's generators. I removed jquery
& Bootstrap
because we're not using Facebook SDK
.
'redux-devtools-diff-monitor', | ||
'redux-devtools-dock-monitor', | ||
'redux-logger', | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I placed the devtools in a separate list so that they could be included in the DLL, yet not included in the production vendor chunk.
@@ -26,11 +28,11 @@ | |||
# If you are using the ReactOnRails::TestHelper.configure_rspec_to_compile_assets(config) | |||
# with rspec then this controls what npm command is run | |||
# to automatically refresh your webpack assets on every test run. | |||
config.npm_build_test_command = "yarn run build:all:rspec" | |||
config.npm_build_test_command = "yarn run build:client-bundles:rspec" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably wasn't absolutely necessary, but since we haven't implemented server rendering yet, I didn't see the point in running build:server-bundle:*
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as long as you make sure you're the one to turn server rendering back on and that you remember you did this, otherwise it's going to cause a yak shave
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do.
per the group decision to abandon
react-hot-loader
and HMR due to its unreliability, incompatibility with flexbox, and lack of active development by Dan Abramov.