1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00

added envs

This commit is contained in:
muerwre 2019-08-06 20:37:50 +07:00
parent bfc779745a
commit d8aee64082
6 changed files with 652 additions and 383 deletions

1
.env_example Normal file
View file

@ -0,0 +1 @@
API_HOST = http://localhost:3333

1
.gitignore vendored
View file

@ -2,3 +2,4 @@
/public
/npm-debug.log
/.idea
/.env

1010
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -27,15 +27,15 @@
"babel-preset-react": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"css-loader": "^0.28.11",
"eslint": "^4.19.1",
"eslint-config-airbnb": "^16.1.0",
"eslint": "^5.16.0",
"eslint-config-airbnb": "^17.1.1",
"eslint-import-resolver-babel-module": "^4.0.0",
"eslint-import-resolver-webpack": "^0.9.0",
"eslint-loader": "^2.0.0",
"eslint-plugin-babel": "^5.0.0",
"eslint-plugin-import": "^2.11.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.7.0",
"eslint-loader": "^2.2.1",
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.14.3",
"file-loader": "^1.1.11",
"html-webpack-plugin": "^3.2.0",
"identity-obj-proxy": "^3.0.0",
@ -65,6 +65,8 @@
"classnames": "^2.2.6",
"clean-webpack-plugin": "^0.1.9",
"connected-react-router": "^6.3.2",
"dotenv": "^8.0.0",
"dotenv-webpack": "^1.7.0",
"history": "^4.7.2",
"http-errors": "~1.6.2",
"less": "^3.8.1",

View file

@ -1,5 +1,5 @@
export const API = {
BASE: 'http://localhost:3333',
BASE: process.env.API_HOST,
USER: {
LOGIN: '/auth/login',
ME: '/auth/me',

View file

@ -1,15 +1,15 @@
// import webpack from 'webpack';
const webpack = require('webpack');
const HtmlWebPackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const { join } = require('path');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const Dotenv = require('dotenv-webpack');
const htmlPlugin = new HtmlWebPackPlugin({
template: './src/index.html',
filename: './index.html',
title: 'VLT',
title: 'VAULT',
hash: false,
// favicon: 'src/sprites/favicon.png',
});
@ -38,6 +38,7 @@ module.exports = () => {
htmlPlugin,
miniCssExractPlugin,
new webpack.HashedModuleIdsPlugin(),
new Dotenv(),
];
return {