Fixed version constants and prod API url

This commit is contained in:
Dmitriy Shishkov 2021-08-09 17:46:02 +03:00
parent f00fd2ae22
commit be978cec32
No known key found for this signature in database
GPG Key ID: 14358F96FCDD8060
4 changed files with 6 additions and 8 deletions

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,
],