Napacitor CLI - nap copy
Copy the web app's build output into the MAUI host project.
npx nap copy [maui]
Behavior:
- Reads
webDirfromnapacitor.config.json. - Clears the host's
wwwroot/and copies the web build output into it. - Applies host-specific adaptations to the copied
index.html(so the page loads correctly inside the BlazorWebView). - Fails if
webDirdoes not exist or does not contain anindex.html— build your web app first.
Example:
npm run build
npx nap copy
Run nap sync instead when you have added or updated plugins, since it also regenerates napacitor.build.props.