Skip to content

Commit

Permalink
Disable extracting chunk manifest until AppShell working
Browse files Browse the repository at this point in the history
Currently deploying new version of the site breaks with service workers
as the extracted chunk manifest (loaded fresh everytime) doesn't match
the chunk ids used in some of the cached chunks.

At least that's my theory :-)

In any case, I keep seeing this error:

bootstrap 1a2fd54…:50 Uncaught TypeError: Cannot read property 'call' of
undefined

which disappears as soon as I update to the latest service worker or
bypass the service worker.

With the AppShell, everything will stay the same until the user updates
to the new version of the service worker so there shouldn't be more
trouble w/ mismatched module ids.
  • Loading branch information
KyleAMathews committed Oct 14, 2016
1 parent 5ad1d72 commit 07ed5b0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
22 changes: 11 additions & 11 deletions lib/utils/static-entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ module.exports = (locals, callback) => {
}

// Add the chunk-manifest as a head component.
const chunkManifest = require('!raw!public/chunk-manifest.json')
headComponents.push(
<script
id="webpack-manifest"
dangerouslySetInnerHTML={{ __html: `
//<![CDATA[
window.webpackManifest = ${chunkManifest}
//]]>
`}}
/>
)
//const chunkManifest = require('!raw!public/chunk-manifest.json')
//headComponents.push(
//<script
//id="webpack-manifest"
//dangerouslySetInnerHTML={{ __html: `
////<![CDATA[
//window.webpackManifest = ${chunkManifest}
////]]>
//`}}
///>
//)

const scripts = [`commons`, `app`]
// Path chunk.
Expand Down
8 changes: 4 additions & 4 deletions lib/utils/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,10 @@ module.exports = (program, directory, suppliedStage, webpackPort = 1500, pages =
// Extract the webpack chunk manifest out of commons.js so commons.js
// doesn't get changed everytime you build. This increases the cache-hit
// rate for commons.js.
new ChunkManifestPlugin({
filename: "chunk-manifest.json",
manifestVariable: "webpackManifest"
}),
//new ChunkManifestPlugin({
//filename: "chunk-manifest.json",
//manifestVariable: "webpackManifest"
//}),
// Minify Javascript.
new webpack.optimize.UglifyJsPlugin({
compress: {
Expand Down

0 comments on commit 07ed5b0

Please sign in to comment.