WIP of converting examples to Webpack v2#742
Conversation
|
@alexfedoseev Can you take a look at my conversions of the webpack configs in |
| { | ||
| "presets": ["es2015", "stage-0", "react"], | ||
| "presets": ["es2015", "stage-2", "react"], | ||
| "plugins": ["syntax-decorators"] |
There was a problem hiding this comment.
I don't think it should be here.
There was a problem hiding this comment.
you mean syntax-decorators?
There was a problem hiding this comment.
Yeah, AFAIR we don't use them anywhere.
| ), | ||
| loader: ExtractTextPlugin.extract({ | ||
| fallback: 'style-loader', | ||
| loader: [ |
| loader: [ | ||
| { | ||
| loader: 'css-loader', | ||
| query: { |
| ), | ||
| loader: ExtractTextPlugin.extract({ | ||
| fallback: 'style-loader', | ||
| loader: [ |
| loader: [ | ||
| { | ||
| loader: 'css-loader', | ||
| query: { |
|
Still some issues:
Phantomjs issueDetails➜ ~/shakacode/react-on-rails/react_on_rails/spec/dummy (update-to-webpack-v2 u=) ✗ rspec './spec/features/integration_spec.rb[1:1:1:1]' ✹ [21:00:16]
Capybara using driver: poltergeist
Run options: include {:ids=>{"./spec/features/integration_spec.rb"=>["1:1:1:1"]}}
Hot Reload IssueDetails➜ ~/shakacode/react-on-rails/react_on_rails/spec/dummy (update-to-webpack-v2 u=) foreman start -f Procfile.hot [21:06:20]
21:06:30 rails.1 | started with pid 7264
21:06:30 hot-assets.1 | started with pid 7265
21:06:30 rails-server-assets.1 | started with pid 7266
21:06:30 hot-assets.1 | yarn run v0.20.3
21:06:30 rails-server-assets.1 | yarn run v0.20.3
21:06:31 rails-server-assets.1 | $ (cd client && yarn run build:dev:server --silent)
21:06:31 hot-assets.1 | $ (cd client && yarn run hot-assets)
21:06:32 hot-assets.1 | yarn run v0.20.3
21:06:32 rails-server-assets.1 | yarn run v0.20.3
21:06:32 hot-assets.1 | $ babel-node server-rails-hot.js
21:06:32 rails-server-assets.1 | $ webpack -w --config webpack.server.rails.build.config.js
21:06:33 rails-server-assets.1 |
21:06:33 rails-server-assets.1 | Webpack is watching the files…
21:06:33 rails-server-assets.1 |
21:06:35 rails.1 | => Booting Puma
21:06:35 rails.1 | => Rails 4.2.8 application starting in development on http://0.0.0.0:3000
21:06:35 rails.1 | => Run `rails server -h` for more startup options
21:06:35 rails.1 | => Ctrl-C to shutdown server
21:06:35 rails.1 | ================================================================================
21:06:35 rails.1 | Using caching = false
21:06:35 rails.1 | ================================================================================
21:06:36 hot-assets.1 | /Users/justin/shakacode/react-on-rails/react_on_rails/spec/dummy/client/webpack.client.rails.hot.config.js:24
21:06:36 hot-assets.1 | config.module.loaders.push({
21:06:36 hot-assets.1 | ^
21:06:36 hot-assets.1 |
21:06:36 hot-assets.1 | TypeError: Cannot read property 'push' of undefined
21:06:36 hot-assets.1 | at Object. (/Users/justin/shakacode/react-on-rails/react_on_rails/spec/dummy/client/webpack.client.rails.hot.config.js:25:1)
21:06:36 hot-assets.1 | at Module._compile (module.js:571:32)
21:06:36 hot-assets.1 | at loader (/Users/justin/shakacode/react-on-rails/react_on_rails/spec/dummy/client/node_modules/babel-register/lib/node.js:144:5)
21:06:36 hot-assets.1 | at Object.require.extensions.(anonymous function) [as .js] (/Users/justin/shakacode/react-on-rails/react_on_rails/spec/dummy/client/node_modules/babel-register/lib/node.js:154:7)
21:06:36 hot-assets.1 | at Module.load (module.js:488:32)
21:06:36 hot-assets.1 | at tryModuleLoad (module.js:447:12)
21:06:36 hot-assets.1 | at Function.Module._load (module.js:439:3)
21:06:36 hot-assets.1 | at Module.require (module.js:498:17)
21:06:36 hot-assets.1 | at require (internal/module.js:20:19)
21:06:36 hot-assets.1 | at Object. (/Users/justin/shakacode/react-on-rails/react_on_rails/spec/dummy/client/server-rails-hot.js:20:1)
21:06:36 hot-assets.1 | error Command failed with exit code 1.
21:06:36 hot-assets.1 | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
21:06:37 hot-assets.1 | error Command failed with exit code 1.
21:06:37 hot-assets.1 | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
21:06:37 hot-assets.1 | exited with code 1
21:06:37 system | sending SIGTERM to all processes
21:06:37 rails.1 | Exiting
21:06:37 rails-server-assets.1 | terminated by SIGTERM
21:06:37 rails.1 | terminated by SIGTERM
|
|
Might be related: shakacode/react-webpack-rails-tutorial#361 |
|
Took out lots of errors! Still got 6 left. Please help! |
* Including the babel-polyfill in the registrations files. * Same for the es5shim
Require path instead of assuming it's already imported.
740e35f to
96bed98
Compare
|
@robwise can you scan these changes. I'd like to merge soon! |
| "jsdom": "^9.9.1", | ||
| "eslint-plugin-jsx-a11y": "^4.0.0", | ||
| "eslint-plugin-react": "^6.10.0", | ||
| "fbjs": "^0.8.9", |
There was a problem hiding this comment.
at some point, this was a peer dep...
1 similar comment
1 similar comment
Following the Shakapacker PR #742 guidelines, this adds comprehensive changelog documentation requirements to CLAUDE.md: - Changelog entries required for user-visible changes only (features, bug fixes, breaking changes, deprecations, performance improvements) - No entries needed for linting, formatting, internal refactoring, tests, or documentation fixes - Format requirements: PR links, author links, consistent formatting - Breaking changes: bold formatting with migration guide links - Version release: update version diff links This ensures consistent, high-quality changelog maintenance across the project. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
* Add changelog guidelines to CLAUDE.md Following the Shakapacker PR #742 guidelines, this adds comprehensive changelog documentation requirements to CLAUDE.md: - Changelog entries required for user-visible changes only (features, bug fixes, breaking changes, deprecations, performance improvements) - No entries needed for linting, formatting, internal refactoring, tests, or documentation fixes - Format requirements: PR links, author links, consistent formatting - Breaking changes: bold formatting with migration guide links - Version release: update version diff links This ensures consistent, high-quality changelog maintenance across the project. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Fix changelog guidelines: PR format and automation reference Fixes identified in code review: 1. PR link format: Changed from `[PR #123]` to `[PR 1818]` (no hash) - Analysis shows 165 entries without hash vs only 7 with hash - Aligns with actual project standard 2. Added reference to `bundle exec rake update_changelog` - This is the existing automation for updating version headers - Mentioned in CHANGELOG.md line 18 but was missing from guidelines 3. Verified file ends with newline (required per CLAUDE.md) These changes ensure guidelines match actual usage and reference existing automation tools. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Enhance changelog guidelines with comprehensive documentation Following code review recommendations, this adds: 1. **Section header guidance**: Documents both standard keepachangelog.com headers (Added, Changed, Deprecated, Removed, Fixed, Security) and project-specific headers (Breaking Changes, New Features, Bug Fixes, Security Enhancements, API Improvements, etc.) 2. **Complete format examples**: Three real-world examples showing: - Simple entry format - Breaking change with migration guide - Entry with sub-bullets All examples verified against actual CHANGELOG.md patterns 3. **Cross-reference**: Added reference to CHANGELOG.md lines 15-18 for contributor guidelines and keepachangelog.com format 4. **Better organization**: Restructured into subsections (Section Headers, Format Requirements, Entry Format Examples) for easier reference These enhancements make the guidelines actionable and ensure consistent, high-quality changelog entries. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Simplify changelog section to conserve space Reduces the changelog section from ~50 lines to 5 concise bullets: - Consolidates what to include/exclude into one line each - Provides format example inline instead of separate section - References CHANGELOG.md lines 15-18 for full guidelines - Points to existing `bundle exec rake update_changelog` task - Includes grep command to view real formatting examples This saves space while making the guidelines more actionable by pointing developers to existing tools and real examples rather than duplicating information. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Add /update-changelog command for guided changelog updates Adds comprehensive slash command based on Shakapacker's implementation with React on Rails-specific improvements: **New slash command**: `/update-changelog` - Provides guided workflow for adding changelog entries - Ensures correct formatting (no hash in PR numbers) - Validates user-visible vs non-user-visible changes - Handles version boundaries and beta releases - Includes real examples from the codebase - Documents both standard and custom section headers **Improvements over Shakapacker version**: - Updated PR link format (no hash symbol) - Documents all React on Rails custom section headers - References `bundle exec rake update_changelog` for version management - Includes actual examples from CHANGELOG.md - Added grep command for viewing real formatting examples **Updated CLAUDE.md**: - References `/update-changelog` command for guided updates - Separates version management (rake task) from entry creation (command) - Maintains concise 6-bullet format This makes changelog updates consistent and reduces errors by providing an interactive guided process with comprehensive documentation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Fix update-changelog command: remove redundancy and fix formatting Addresses code review feedback: 1. **Removed redundant section headers**: - "New Features" (redundant with standard "Added") - "Bug Fixes" (redundant with standard "Fixed") - "Security Enhancements" (redundant with standard "Security") - "Code Improvements" (internal, not user-visible) 2. **Added "Improved" to standard headers** (used 9 times in CHANGELOG.md) 3. **Emphasized standard headers**: Updated guidance to prefer standard keepachangelog.com headers and use custom ones sparingly 4. **Fixed broken markdown formatting**: - Corrected triple/quadruple backtick issues in Breaking Change example - Removed nested code blocks that broke rendering - Simplified code examples within the markdown example 5. **Final header list**: - Standard: Added, Changed, Deprecated, Removed, Fixed, Security, Improved - Custom: Breaking Changes, API Improvements, Developer Experience, Generator Improvements, Performance, Pro License Features This reduces confusion and ensures the command guides developers to use consistent, standard headers while keeping legitimate project-specific headers for special cases. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>

This change is