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

Properly deal with webpack's publicPath + importWorkboxFrom: 'local' #1173

Merged
merged 3 commits into from
Jan 13, 2018

Conversation

jeffposnick
Copy link
Contributor

R: @addyosmani @gauntface

Fixes #1172

This was due to a missing () around an || operator.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 88.274% when pulling 2de1ae1 on publicPath-webpack-fix into f01ee1f on v3.

const modulePathPrefix = path.dirname(libraryFiles[0]);

const basenames = libraryFiles.map((file) => path.basename(file));
expect(basenames).to.eql([
Copy link
Member

Choose a reason for hiding this comment

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

My only passing comment is that it appears lines 197 and 311 execute expect(basenames).to.eql() against the same list of dev, prod and map files - should this list of basenames be turned into a variable if they're the same between both tests? If I missed something and they're not exactly 1:1, feel free to ignore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. Changing!

Copy link
Member

@addyosmani addyosmani left a comment

Choose a reason for hiding this comment

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

LGTM minus one comment

@workbox-pr-bot
Copy link
Collaborator

PR-Bot Size Plugin

Changed File Sizes

No file sizes have changed.

New Files

No new files have been added.

All File Sizes

View Table
File Before After Change GZipped
packages/workbox-background-sync/build/workbox-background-sync.prod.js 3.21 KB 3.21 KB 0% 1.38 KB
packages/workbox-broadcast-cache-update/build/workbox-broadcast-cache-update.prod.js 1.06 KB 1.06 KB 0% 567 B
packages/workbox-build/build/_types.js 41 B 41 B 0% 61 B
packages/workbox-build/build/index.js 2.52 KB 2.52 KB 0% 1.06 KB
packages/workbox-cache-expiration/build/workbox-cache-expiration.prod.js 3.29 KB 3.29 KB 0% 1.22 KB
packages/workbox-cacheable-response/build/workbox-cacheable-response.prod.js 591 B 591 B 0% 344 B
packages/workbox-cli/build/app.js 4.57 KB 4.57 KB 0% 1.65 KB
packages/workbox-cli/build/bin.js 2.53 KB 2.53 KB 0% 1.07 KB
packages/workbox-core/build/workbox-core.prod.js 6.38 KB 6.38 KB 0% 2.53 KB
packages/workbox-google-analytics/build/workbox-google-analytics.prod.js 1.92 KB 1.92 KB 0% 1.00 KB
packages/workbox-precaching/build/workbox-precaching.prod.js 5.18 KB 5.18 KB 0% 2.02 KB
packages/workbox-range-requests/build/workbox-range-requests.prod.js 1.66 KB 1.66 KB 0% 816 B
packages/workbox-routing/build/workbox-routing.prod.js 2.77 KB 2.77 KB 0% 1.26 KB
packages/workbox-strategies/build/workbox-strategies.prod.js 3.24 KB 3.24 KB 0% 1.01 KB
packages/workbox-sw/build/workbox-sw.js 1.46 KB 1.46 KB 0% 795 B
packages/workbox-webpack-plugin/build/generate-sw.js 5.84 KB 5.84 KB 0% 2.04 KB
packages/workbox-webpack-plugin/build/index.js 742 B 742 B 0% 470 B
packages/workbox-webpack-plugin/build/inject-manifest.js 7.95 KB 7.95 KB 0% 2.65 KB

Workbox Aggregate Size Plugin

☠️ WARNING ☠️

We are using 153% of our max size budget.

Total Size: 22.38KB
Percentage of Size Used: 153%

Gzipped: 8.96KB

@coveralls
Copy link

Coverage Status

Coverage remained the same at 88.274% when pulling f4ec7cc on publicPath-webpack-fix into f01ee1f on v3.

@jeffposnick jeffposnick merged commit 611d162 into v3 Jan 13, 2018
@jeffposnick jeffposnick deleted the publicPath-webpack-fix branch January 13, 2018 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants