-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
2,672 additions
and
3,912 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,37 @@ | ||
// Import rollup plugins | ||
import html from "@web/rollup-plugin-html"; | ||
import {copy} from "@web/rollup-plugin-copy"; | ||
import { copy } from "@web/rollup-plugin-copy"; | ||
import resolve from "@rollup/plugin-node-resolve"; | ||
import {terser} from "rollup-plugin-terser"; | ||
import { terser } from "rollup-plugin-terser"; | ||
import minifyHTML from "rollup-plugin-minify-html-literals"; | ||
import summary from "rollup-plugin-summary"; | ||
|
||
export default { | ||
plugins: [ | ||
// Entry point for application build; can specify a glob to build multiple | ||
// HTML files for non-SPA app | ||
html({ | ||
input: 'index.html', | ||
input: "index.html", | ||
}), | ||
// Resolve bare module specifiers to relative paths | ||
resolve(), | ||
// Minify HTML template literals | ||
minifyHTML(), | ||
// Minify JS | ||
terser({ | ||
ecma: 2021, | ||
module: true, | ||
warnings: true, | ||
}), | ||
// Print bundle summary | ||
summary(), | ||
// Optional: copy any static assets to build directory | ||
copy({ | ||
patterns: ['src/img/**/*', 'src/locales/**/*'] | ||
}) | ||
patterns: ["src/img/**/*", "src/locales/**/*"], | ||
}), | ||
], | ||
output: { | ||
dir: 'dist', | ||
dir: "dist", | ||
}, | ||
preserveEntrySignatures: 'strict', | ||
}; | ||
preserveEntrySignatures: "strict", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
if('serviceWorker' in navigator){ | ||
navigator.serviceWorker.register("/service-worker.js") | ||
.then( (reg) => console.log('service worker registered')) | ||
.catch( (err) => console.log('service worker not registered')) | ||
} | ||
if ("serviceWorker" in navigator) { | ||
navigator.serviceWorker | ||
.register("/service-worker.js") | ||
.then((reg) => console.log("service worker registered")) | ||
.catch((err) => console.log("service worker not registered")); | ||
} |
Oops, something went wrong.