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

Add Gzip support for JSON pages #571

Merged
merged 18 commits into from
Dec 31, 2016
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Remove unwanted json pages cleanup.
  • Loading branch information
arunoda committed Dec 31, 2016
commit 343cb924745f82d877eadac14ea054ef2be079b6
8 changes: 0 additions & 8 deletions server/build/plugins/json-pages-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@ export default class JsonPagesPlugin {
.keys(compilation.assets)
.filter((filename) => /^bundles\/pages.*\.js$/.test(filename))
Copy link

Choose a reason for hiding this comment

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

This regex doesn't match the way one could wish for in windows, causing pages not to be compiled to json, causing issue #597 thus making most tests fail on windows.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @msand for figuring this out.


const jsonPages = Object
.keys(compilation.assets)
.filter((filename) => /^bundles\/pages.*\.json$/.test(filename))

// Delete existing json pages
// Otherwise, we might keep JSON pages for deleted pages.
jsonPages.forEach((pagePath) => delete compilation.assets[pagePath])

pages.forEach((pageName) => {
const page = compilation.assets[pageName]
delete compilation.assets[pageName]
Expand Down