Merge pull request #2 from publite/pwa

Hot fixes
This commit is contained in:
Dmitriy Shishkov 2021-08-09 17:50:46 +03:00 committed by GitHub
commit 182b8907ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 9 deletions

View File

@ -41,7 +41,7 @@ dokku apps:create publitefrontend
dokku git:from-image publitefrontend publite/frontend:latest
```
# TODO
## TODO
- Migrate pagination cache and book state from LocalStorage to IndexedDB
- Add menu with book view setting

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 149 KiB

View File

@ -1,5 +1,5 @@
export const API_URL = process.env.PUBLIC_API_URL || "";
export const BASE_URL = process.env.PUBLIC_BASE_URL || "";
export const CACHE = "v1.0.1";
export const CACHE = "v1.1.1";
export const DB_NAME = "publite";
export const DB_VERSION = 101;
export const DB_VERSION = 111;

View File

@ -1,5 +1,4 @@
const path = require("path");
const webpack = require("webpack");
const CopyPlugin = require("copy-webpack-plugin");
const ForkTsCheckerPlugin = require("fork-ts-checker-webpack-plugin");
@ -40,11 +39,6 @@ module.exports = {
alias: { "~": path.resolve(__dirname, "src/") },
},
plugins: [
new webpack.DefinePlugin({
"process.env.PUBLIC_API_URL": JSON.stringify(
"http://localhost:8081"
),
}),
new ForkTsCheckerPlugin(),
new CopyPlugin({
patterns: [{ from: "./public", to: "." }],

View File

@ -21,6 +21,7 @@ module.exports = {
new webpack.DefinePlugin({
"process.env.NODE_ENV": JSON.stringify("development"),
"process.env.PUBLIC_BASE_URL": JSON.stringify("http://localhost:8080"),
"process.env.PUBLIC_API_URL": JSON.stringify("http://localhost:8081"),
}),
...webpackConfig.plugins,
],

View File

@ -15,6 +15,9 @@ module.exports = {
"process.env.PUBLIC_BASE_URL": JSON.stringify(
"https://publite.dmitriy.icu"
),
"process.env.PUBLIC_API_URL": JSON.stringify(
"https://publitebackend.dmitriy.icu"
),
}),
...webpackConfig.plugins,
],