@iankibetsh/shframework 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/library.js CHANGED
@@ -38,9 +38,10 @@ var shstorage = {
38
38
  removeItem
39
39
  };
40
40
 
41
- let apiUrl = window.VITE_APP_API_URL;
41
+ let apiUrl = undefined.VITE_APP_API_URL;
42
+ // eslint-disable-next-line no-undef
42
43
  if (process.env.NODE_ENV === 'production') {
43
- apiUrl = window.VITE_APP_API_PRODUCTION_URL;
44
+ apiUrl = undefined.VITE_APP_API_PRODUCTION_URL;
44
45
  }
45
46
  const axios = Axios__default["default"].create({
46
47
  baseURL: apiUrl
package/dist/library.mjs CHANGED
@@ -26,9 +26,10 @@ var shstorage = {
26
26
  removeItem
27
27
  };
28
28
 
29
- let apiUrl = window.VITE_APP_API_URL;
29
+ let apiUrl = import.meta.env.VITE_APP_API_URL;
30
+ // eslint-disable-next-line no-undef
30
31
  if (process.env.NODE_ENV === 'production') {
31
- apiUrl = window.VITE_APP_API_PRODUCTION_URL;
32
+ apiUrl = import.meta.env.VITE_APP_API_PRODUCTION_URL;
32
33
  }
33
34
  const axios = Axios.create({
34
35
  baseURL: apiUrl
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iankibetsh/shframework",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Vue library for handling laravel backend",
5
5
  "main": "dist/library.js",
6
6
  "module": "dist/library.mjs",
@@ -36,7 +36,8 @@
36
36
  "rollup-plugin-peer-deps-external": "^2.2.4",
37
37
  "rollup-plugin-vue": "^6.0.0",
38
38
  "vite": "^3.0.7",
39
- "vuepress": "^2.0.0-beta.48"
39
+ "vuepress": "^2.0.0-beta.48",
40
+ "rollup-plugin-dotenv": "^0.3.0"
40
41
  },
41
42
  "dependencies": {
42
43
  "vue-router": "^4.1.4"