Skip to content

Justin808/webpacker integration#822

Merged
justin808 merged 24 commits intomasterfrom
justin808/webpacker_integration
May 6, 2017
Merged

Justin808/webpacker integration#822
justin808 merged 24 commits intomasterfrom
justin808/webpacker_integration

Conversation

@justin808
Copy link
Copy Markdown
Member

@justin808 justin808 commented Apr 26, 2017

This builds on #811.

This change is Reviewable

@justin808 justin808 force-pushed the justin808/webpacker_integration branch 2 times, most recently from 3cea6dc to 791a68b Compare April 26, 2017 10:16
const { env, paths, publicPath } = webpackConfigLoader(resolve('..', 'config', 'webpack'));
const webpackConfigLoader = require('react-on-rails/node_package/lib/webpackConfigLoader').default;
const configPath = resolve('..', 'config', 'webpack');
const { env, paths, publicPath } = webpackConfigLoader(configPath);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@alexfedoseev @robwise Does this look OK?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@justin808 What are your concerns here? JS looks ok.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@alexfedoseev are you okay with making everyone modify their webpack configs to import env, paths, and publicPath from this react-on-rails lib for webpackConfigLoader instead of setting themselves manually as normal?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm going to change this around a bit as there seems to be no reason to have the webpack config helper go through babel. Thus, I can move the file so that the

require('react-on-rails/node_package/lib/webpackConfigLoader')

is simpler, like this:

require('react-on-rails/webpackConfigLoader')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@alexfedoseev are you okay with making everyone modify their webpack configs to import env, paths, and publicPath from this react-on-rails lib for webpackConfigLoader instead of setting themselves manually as normal?

Sounds like unnecessary and leaky layer.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@alexfedoseev and @robwise I have no idea on what you're referring to. The only reason to modify the webpack configs is so that the webpacker_lite view helper will be able to go the public output directory and thus bypass the asset pipeline.

@justin808
Copy link
Copy Markdown
Member Author

CC: @kaizencodes be sure to check out any commits here.

@justin808
Copy link
Copy Markdown
Member Author

@kaizencodes

image

package.json
image

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.08%) to 97.943% when pulling 33335aa on justin808/webpacker_integration into 5e4f5c5 on master.

1 similar comment
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.08%) to 97.943% when pulling 33335aa on justin808/webpacker_integration into 5e4f5c5 on master.

@justin808 justin808 force-pushed the justin808/webpacker_integration branch from aa621eb to e4810b6 Compare April 27, 2017 10:08
@justin808
Copy link
Copy Markdown
Member Author

justin808 commented Apr 27, 2017

@kaizencodes I've released the beta:

Gem: 7.1.0.beta.2
Npm: 7.1.0-beta.2

CC: @dzirtusss @udovenko @Judahmeek @robwise

You shouldn’t need to change anything at all besides the versions. I want to know if this switch to webpacker for the generators breaks existing apps first.

Next step will be a README for the migration to user webpacker_lite and to avoid the asset pipeline.

kaizencodes and others added 18 commits April 30, 2017 10:46
- add alias for gen examples
* Any version mismatch of gem and node package throws an error.
* 6.9 introduced code that would parse the props into a Hash
  unnecessarily. Any customers with significant String props took a
  performance hit from this on page rendering.
* Fix is to only put props inside of the script tag, and not any meta
  data, like the dom id and name of the component. This avoids unnecessary parsing.
* No need to use babel on this file
* Add another .eslintrc to avoid error on missing require
* Configured package.json to export the file webpackConfigLoader.js
* New default dir reflects generators
@justin808 justin808 force-pushed the justin808/webpacker_integration branch from eb84ec5 to 95765e3 Compare April 30, 2017 20:53
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.06%) to 97.967% when pulling bac53b1 on justin808/webpacker_integration into 4c4a27f on master.

@justin808 justin808 merged commit fcd6e28 into master May 6, 2017
@justin808 justin808 deleted the justin808/webpacker_integration branch May 6, 2017 09:07
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.

5 participants