Skip to content

Commit

Permalink
Updated dependencies and webpack configs to reproduce bug
Browse files Browse the repository at this point in the history
  • Loading branch information
akash5474 committed Jun 19, 2018
1 parent ca2aa8a commit 764c1be
Show file tree
Hide file tree
Showing 8 changed files with 12,192 additions and 6,440 deletions.
12,146 changes: 12,146 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"react-dom": "^16.0.0",
"react-universal-component": "^2.5.1",
"webpack-dev-middleware": "^1.11.0",
"webpack-flush-chunks": "^1.1.23"
"webpack-flush-chunks": "^2.0.0"
},
"devDependencies": {
"babel-cli": "^6.24.0",
Expand All @@ -44,7 +44,7 @@
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "^7.4.0",
"extract-css-chunks-webpack-plugin": "^2.0.17",
"extract-css-chunks-webpack-plugin": "^3.0.5",
"husky": "^0.14.3",
"lint-staged": "^4.2.3",
"poststylus": "^1.0.0",
Expand All @@ -54,7 +54,7 @@
"stylus": "^0.54.5",
"stylus-loader": "^3.0.1",
"travis-github-status": "^1.4.0",
"webpack": "^3.5.1",
"webpack": "^4.12.0",
"webpack-hot-middleware": "^2.17.1",
"webpack-hot-server-middleware": "^0.1.0",
"write-file-webpack-plugin": "^4.1.0"
Expand Down
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import App from './components/App'

const history = createHistory()

console.log('hello world')

const render = App =>
ReactDOM.hydrate(
<AppContainer>
Expand Down
41 changes: 19 additions & 22 deletions webpack/client.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,19 @@ module.exports = {
},
{
test: /\.styl$/,
use: ExtractCssChunks.extract({
use: [
{
loader: 'css-loader',
options: {
modules: true,
localIdentName: '[name]__[local]--[hash:base64:5]'
}
},
{
loader: 'stylus-loader'
use: [
ExtractCssChunks.loader,
{
loader: 'css-loader',
options: {
modules: true,
localIdentName: '[name]__[local]--[hash:base64:5]'
}
]
})
},
{
loader: 'stylus-loader'
}
]
}
]
},
Expand All @@ -51,18 +50,16 @@ module.exports = {
plugins: [
new WriteFilePlugin(),
new ExtractCssChunks(),
new webpack.optimize.CommonsChunkPlugin({
names: ['bootstrap'], // needed to put webpack bootstrap code before chunks
filename: '[name].js',
minChunks: Infinity
}),

new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin(),
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('development')
}
})
]
],

optimization: {
runtimeChunk: {
name: 'bootstrap'
}
}
}
55 changes: 20 additions & 35 deletions webpack/client.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,19 @@ module.exports = {
},
{
test: /\.styl$/,
use: ExtractCssChunks.extract({
use: [
{
loader: 'css-loader',
options: {
modules: true,
localIdentName: '[name]__[local]--[hash:base64:5]'
}
},
{
loader: 'stylus-loader'
use: [
ExtractCssChunks.loader,
{
loader: 'css-loader',
options: {
modules: true,
localIdentName: '[name]__[local]--[hash:base64:5]'
}
]
})
},
{
loader: 'stylus-loader'
}
]
}
]
},
Expand All @@ -44,31 +43,17 @@ module.exports = {
},
plugins: [
new ExtractCssChunks(),
new webpack.optimize.CommonsChunkPlugin({
names: ['bootstrap'], // needed to put webpack bootstrap code before chunks
filename: '[name].[chunkhash].js',
minChunks: Infinity
}),

new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('production')
}
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
screw_ie8: true,
warnings: false
},
mangle: {
screw_ie8: true
},
output: {
screw_ie8: true,
comments: false
},
sourceMap: true
}),
new webpack.HashedModuleIdsPlugin() // not needed for strategy to work (just good practice)
]
})
],

optimization: {
runtimeChunk: {
name: 'bootstrap'
}
}
}
2 changes: 1 addition & 1 deletion webpack/server.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports = {
externals,
output: {
path: output,
filename: '[name].js',
filename: 'main.js',
libraryTarget: 'commonjs2'
},
module: {
Expand Down
2 changes: 1 addition & 1 deletion webpack/server.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
entry: [entry],
output: {
path: output,
filename: '[name].js',
filename: 'main.js',
libraryTarget: 'commonjs2'
},
module: {
Expand Down
Loading

0 comments on commit 764c1be

Please sign in to comment.