Skip to content

Instantly share code, notes, and snippets.

@YSRKEN
Last active June 27, 2018 14:40
Show Gist options
  • Save YSRKEN/c3523c6fc936c82d4fb7d714b6d90359 to your computer and use it in GitHub Desktop.
Save YSRKEN/c3523c6fc936c82d4fb7d714b6d90359 to your computer and use it in GitHub Desktop.
【入門】AngularでPWAアプリを作ってGithub.ioに投稿するまで ref: https://qiita.com/YSRKEN/items/96226cfb81579830a92b
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
// これを
"outputPath": "dist/my-app",
// このように修正
"outputPath": "../docs",
"baseHref": ".",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
imports: [
BrowserModule.withServerTransition({ appId: 'serverApp' }),
AppRoutingModule,
// これを
ServiceWorkerModule.register('/ngsw-worker.js', { enabled: environment.production }),
// このように修正
ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production }),
RouterModule,
BrowserAnimationsModule,
MatButtonModule,
MatCheckboxModule
],
"background_color": "#fafafa",
"display": "standalone",
"scope": "/",
// これを
"start_url": "/",
// このように修正
"start_url": "/my-app/",
"icons": [
{
"src": "assets/icons/icon-72x72.png",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment