include offline copy of docs

This grabs the docs via the @pybricks/ide-docs package and copies them
to the build directory with copy-webpack-plugin.

The service worker automatically picks up these files for precache
since they go through webpack.
This commit is contained in:
David Lechner
2021-01-25 21:05:14 -06:00
parent 62ceab4561
commit afc8e7c628
5 changed files with 37 additions and 4 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ function App(): JSX.Element {
<div className="h-100 w-100">
{dragging && <div className="h-100 w-100 p-absolute" />}
<iframe
src="https://docs.pybricks.com"
src="static/docs/index.html"
allowFullScreen={true}
title="docs"
width="100%"
+1 -1
View File
@@ -22,7 +22,7 @@ clientsClaim();
// Their URLs are injected into the manifest variable below.
// This variable must be present somewhere in your service worker file,
// even if you decide not to use precaching. See https://cra.link/PWA
precacheAndRoute(self.__WB_MANIFEST);
precacheAndRoute(self.__WB_MANIFEST, { ignoreURLParametersMatching: [/.*/] });
// Set up App Shell-style routing, so that all navigation requests
// are fulfilled with your index.html shell. Learn more at