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

Update webpack to version 2.3.x #771

Merged
merged 7 commits into from
Mar 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Contributors: please follow the recommendations outlined at [keepachangelog.com]

## [Unreleased]
*Please add entries here for your pull requests.*
## Changed
- Change webpack output path to absolute and update webpack to version ^2.3.1. [#771](https://github.com/shakacode/react_on_rails/pull/771) by [cheremukhin23](https://github.com/cheremukhin23).

## [6.8.1] - 2017-03-21
### Fixed
Expand Down
2 changes: 1 addition & 1 deletion docs/additional-reading/webpack.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
You can try out example app, [shakacode/react-webpack-rails-tutorial](https://github.com/shakacode/react-webpack-rails-tutorial). We're building comprehensive production examples in our new, premium product, [**React on Rails Pro**](https://forum.shakacode.com/t/introducing-react-on-rails-pro-subscriptions/785). If you're interested, please see the details in [this forum post](https://forum.shakacode.com/t/introducing-react-on-rails-pro-subscriptions/785).

## Webpack v1 or v2?
We recommend using Webpack version 2.2.1 or greater.
We recommend using Webpack version 2.3.1 or greater.

## yarn or npm?
Yarn is the current recommendation!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"react-redux": "^5.0.3",
"redux": "^3.6.0",
<%- end -%>
"webpack": "^2.2.1"
"webpack": "^2.3.1"
},
"devDependencies": {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"only-multiline"} ] */

const webpack = require('webpack');
const pathLib = require('path');

const devBuild = process.env.NODE_ENV !== 'production';

Expand All @@ -16,7 +17,7 @@ const config = {

output: {
filename: 'webpack-bundle.js',
path: '../app/assets/webpack',
path: pathLib.resolve(__dirname, '../app/assets/webpack'),
},

resolve: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"release-it": "^2.5.4",
"tap-spec": "^4.1.1",
"tape": "^4.6.3",
"webpack": "^2.2.1"
"webpack": "^2.3.1"
},
"peerDependencies": {
"babel-runtime": ">= 6",
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"sass-resources-loader": "1.2.0",
"style-loader": "^0.13.2",
"url-loader": "^0.5.8",
"webpack": "^2.2.1"
"webpack": "^2.3.1"
},
"devDependencies": {
"babel-plugin-react-transform": "^2.0.2",
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/client/webpack.client.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
'startup/clientRegistration',
],
output: {
path: '../app/assets/webpack',
path: path.resolve(__dirname, '../app/assets/webpack'),
// Implement chunkhash and bypass the asset pipeline
// TODO: https://webpack.js.org/guides/code-splitting-libraries/#manifest-file
filename: 'client.js',
Expand Down
3 changes: 2 additions & 1 deletion spec/dummy/client/webpack.client.rails.build.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@

const ExtractTextPlugin = require('extract-text-webpack-plugin');
const config = require('./webpack.client.base.config');
const path = require('path');

const devBuild = process.env.NODE_ENV !== 'production';

config.output = {
filename: '[name]-bundle.js',
path: '../app/assets/webpack',
path: path.resolve(__dirname, '../app/assets/webpack'),
publicPath: '/assets/',
};

Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/client/webpack.server.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
'startup/serverRegistration',
],
output: {
path: '../app/assets/webpack',
path: path.resolve(__dirname, '../app/assets/webpack'),
filename: 'server.js',
},
resolve: {
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/client/webpack.server.rails.build.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = {
],
output: {
filename: 'server-bundle.js',
path: '../app/assets/webpack',
path: path.resolve(__dirname, '../app/assets/webpack'),
},
resolve: {
extensions: ['.js', '.jsx'],
Expand Down