From be978cec3284f5da6ad77f77e49357028f4cf789 Mon Sep 17 00:00:00 2001 From: dm1sh Date: Mon, 9 Aug 2021 17:46:02 +0300 Subject: [PATCH] Fixed version constants and prod API url --- src/constants.ts | 4 ++-- webpack.config.common.js | 6 ------ webpack.config.dev.js | 1 + webpack.config.prod.js | 3 +++ 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index d48c442..613eb91 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -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; diff --git a/webpack.config.common.js b/webpack.config.common.js index fe3aff8..2c4a472 100644 --- a/webpack.config.common.js +++ b/webpack.config.common.js @@ -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: "." }], diff --git a/webpack.config.dev.js b/webpack.config.dev.js index da9a17d..f77b244 100644 --- a/webpack.config.dev.js +++ b/webpack.config.dev.js @@ -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, ], diff --git a/webpack.config.prod.js b/webpack.config.prod.js index 486866d..4919ceb 100644 --- a/webpack.config.prod.js +++ b/webpack.config.prod.js @@ -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, ],