dojo / cli-build-webpack

🚀 **DEPRECATED** Dojo 2 - cli command for building applications
http://dojo.io
Other
4 stars 19 forks source link

Copy manifest to output dir #170

Closed maier49 closed 7 years ago

maier49 commented 7 years ago

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

matt-gadd commented 7 years ago

what happens if it's not there? does the CopyWebpackPlugin handle it gracefully?

maier49 commented 7 years ago

@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.

kitsonk commented 7 years ago

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.

maier49 commented 7 years ago

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.

kitsonk commented 7 years ago

Yeah, sorry, obviously some way of enabling Service Workers/detecting Service Workers being enabled. 👍

maier49 commented 7 years ago

@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.

maier49 commented 7 years ago

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.