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

sw-build: globPatterns doesn't respect rootDirectory #338

Closed
addyosmani opened this issue Mar 15, 2017 · 2 comments
Closed

sw-build: globPatterns doesn't respect rootDirectory #338

addyosmani opened this issue Mar 15, 2017 · 2 comments
Labels
Bug An issue with our existing, production codebase.

Comments

@addyosmani
Copy link
Member

Library Affected:
sw-build

Browser & Platform:
All browsers

Issue or Feature Request Description:
Reported via @arthurevans: when specifying a globPattern, users expect that they won't need to define the rootDirectory as part of the globPattern path - it should be the prefixed used. The current behavior will however not work. To fix that you need to manually prefix the root directory yourself:

swBuild.generateFileManifest({
  dest: './dist/precache-manifest.js',
  rootDirectory: './dist/',
-  globPatterns: ['dist/**'],
+  globPatterns: ['dist/**'],
  globIgnores: ['service-worker.js'],
})
.then(() => {
  console.log('File manifest has been created.');
});

I have verified this locally and ran into this bug in my own implementation over in ReactHN.

@addyosmani addyosmani added Bug An issue with our existing, production codebase. hackday labels Mar 15, 2017
@jeffposnick
Copy link
Contributor

Related: #358

@addyosmani addyosmani added the P0 label Mar 29, 2017
@gauntface
Copy link

This should be fixed by #408

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug An issue with our existing, production codebase.
Projects
None yet
Development

No branches or pull requests

3 participants