Closed maier49 closed 7 years ago
what happens if it's not there? does the CopyWebpackPlugin
handle it gracefully?
@matt-gadd If manifest.json
doesn't exist it still performs the rest of the build, but there's an error for the failed copy and it is reported as a failed build.
Wouldn't it be better than to be explicit at the CLI that this is a PWA and that this would be a terminal error, or there is some other way of auto-detecting if we are dealing with a PWA? Having random errors that should be ignored, unless of course they shouldn't isn't the best from a usability perspective, IMO.
Well it's not a PWA if service workers are not enabled, but using service workers doesn't mean it is a PWA. I feel like copying this only when service workers are enabled would be good enough. If not though, we could have a pwa cli argument, that enables this and service workers.
Yeah, sorry, obviously some way of enabling Service Workers/detecting Service Workers being enabled. 👍
@kitsonk Ok this is only adding the copy plugin for the manifest.json file if service workers are enabled now. The easiest way to do that was to pull in the service worker changes though so this now depends on that PR.
In light of the concerns mentioned in this comment, we will take a different approach for supporting service workers and other PWA features. It will involve using .dojorc
and generating appropriate files in cli-build-webpack
, as opposed to adding code to cli-create-app
that may not apply in all cases.
Type: feature
The following has been addressed in the PR:
Description:
This is the other part of https://github.com/dojo/cli-create-app/pull/86/files. Addresses dojo/meta#170