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

External dependencies #145

Closed
wants to merge 8 commits into from

Conversation

CodingDive
Copy link

This PR hopes to add support for importing external dependencies within the service-worker by bundling dependencies into the sw.js bundle.

At the very beginning (August in the commit history) I implemented the same changes as @dadleyy. #63
Inside the package.json of my Ember app, I was consuming the fork directly from GitHub which worked fine. After recently upgrading our Ember project to version 3.5.1, the fix stopped working and I got a lot of Rollup and dependency related issues. The package was tested with 3.5.1 but I do need some guidance on how to test different ember versions and write automated tests for my changes.

I also thought I could maybe fix another issue by allowing one to configure babel. As the issues were not related to each other, the changes didn't make it into the final version and I'm saving this issue for another day or someone else.

I wasn't able to run the tests yet due to build errors. The loader.js addon is missing from your project, please add it to your package.json and after adding it, another build error Missing template processor. If anyone can shed some light on what the best way is to get the tests up and running, please let me know.

This is my first non trivial PR so any feedback is greatly appreciated.

Mikey and others added 8 commits August 29, 2018 16:46
^--^  ^------------^
|     |
|     +-> Allow to import external dependencies inside service-worker scripts
|
+-------> Full credit goes to GitHub user @dadleyy. https://github.com/DockYard/ember-service-worker/compare/master...dadleyy:resolve-plugin?expand=1
Resolved merge conflicts
package.json
package-lock.json
service-worker-builder.js
Added some console log statements for debugging.
* fixed `Build Error (RollupWithDependencies) 'default' is not exported by node_modules/the-answer` by adding the commonjs rollup plugin
* fixed `missing paths 'the-answer' is imported by ../../../../../tmp/broccoli-1499Qnek5OYRMuEP/out-908-broccoli_persistent_filter_babel_babel_project/service-worker/index.js, but could not be resolved – treating it as an external dependency` by adding the rollup-plugin-includepaths
* fixed the rollup deprecation warning by moving `exports` into the output object
@eshtadc
Copy link
Contributor

eshtadc commented Dec 18, 2019

@CodingDive I wonder if this is still relevant given the dependency updates that have been made lately?

@CodingDive
Copy link
Author

I'm no longer working with Ember or this project. @MarcoUmpierrez can you confirm that the PR can be closed and is no longer relevant?

@MarcoUmpierrez
Copy link

Sorry for the delay. Yes, you can close this PR. Thanks.

@eshtadc
Copy link
Contributor

eshtadc commented Jan 15, 2020

Thanks for confirming @MarcoUmpierrez

@eshtadc eshtadc closed this Jan 15, 2020
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.

3 participants