mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
added envs
This commit is contained in:
parent
bfc779745a
commit
d8aee64082
6 changed files with 652 additions and 383 deletions
1
.env_example
Normal file
1
.env_example
Normal file
|
@ -0,0 +1 @@
|
||||||
|
API_HOST = http://localhost:3333
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,3 +2,4 @@
|
||||||
/public
|
/public
|
||||||
/npm-debug.log
|
/npm-debug.log
|
||||||
/.idea
|
/.idea
|
||||||
|
/.env
|
||||||
|
|
1010
package-lock.json
generated
1010
package-lock.json
generated
File diff suppressed because it is too large
Load diff
16
package.json
16
package.json
|
@ -27,15 +27,15 @@
|
||||||
"babel-preset-react": "^6.24.1",
|
"babel-preset-react": "^6.24.1",
|
||||||
"babel-preset-stage-2": "^6.24.1",
|
"babel-preset-stage-2": "^6.24.1",
|
||||||
"css-loader": "^0.28.11",
|
"css-loader": "^0.28.11",
|
||||||
"eslint": "^4.19.1",
|
"eslint": "^5.16.0",
|
||||||
"eslint-config-airbnb": "^16.1.0",
|
"eslint-config-airbnb": "^17.1.1",
|
||||||
"eslint-import-resolver-babel-module": "^4.0.0",
|
"eslint-import-resolver-babel-module": "^4.0.0",
|
||||||
"eslint-import-resolver-webpack": "^0.9.0",
|
"eslint-import-resolver-webpack": "^0.9.0",
|
||||||
"eslint-loader": "^2.0.0",
|
"eslint-loader": "^2.2.1",
|
||||||
"eslint-plugin-babel": "^5.0.0",
|
"eslint-plugin-babel": "^5.3.0",
|
||||||
"eslint-plugin-import": "^2.11.0",
|
"eslint-plugin-import": "^2.18.2",
|
||||||
"eslint-plugin-jsx-a11y": "^6.0.3",
|
"eslint-plugin-jsx-a11y": "^6.2.3",
|
||||||
"eslint-plugin-react": "^7.7.0",
|
"eslint-plugin-react": "^7.14.3",
|
||||||
"file-loader": "^1.1.11",
|
"file-loader": "^1.1.11",
|
||||||
"html-webpack-plugin": "^3.2.0",
|
"html-webpack-plugin": "^3.2.0",
|
||||||
"identity-obj-proxy": "^3.0.0",
|
"identity-obj-proxy": "^3.0.0",
|
||||||
|
@ -65,6 +65,8 @@
|
||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"clean-webpack-plugin": "^0.1.9",
|
"clean-webpack-plugin": "^0.1.9",
|
||||||
"connected-react-router": "^6.3.2",
|
"connected-react-router": "^6.3.2",
|
||||||
|
"dotenv": "^8.0.0",
|
||||||
|
"dotenv-webpack": "^1.7.0",
|
||||||
"history": "^4.7.2",
|
"history": "^4.7.2",
|
||||||
"http-errors": "~1.6.2",
|
"http-errors": "~1.6.2",
|
||||||
"less": "^3.8.1",
|
"less": "^3.8.1",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
export const API = {
|
export const API = {
|
||||||
BASE: 'http://localhost:3333',
|
BASE: process.env.API_HOST,
|
||||||
USER: {
|
USER: {
|
||||||
LOGIN: '/auth/login',
|
LOGIN: '/auth/login',
|
||||||
ME: '/auth/me',
|
ME: '/auth/me',
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
// import webpack from 'webpack';
|
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
const HtmlWebPackPlugin = require('html-webpack-plugin');
|
const HtmlWebPackPlugin = require('html-webpack-plugin');
|
||||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
||||||
const { join } = require('path');
|
const { join } = require('path');
|
||||||
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
||||||
|
const Dotenv = require('dotenv-webpack');
|
||||||
|
|
||||||
const htmlPlugin = new HtmlWebPackPlugin({
|
const htmlPlugin = new HtmlWebPackPlugin({
|
||||||
template: './src/index.html',
|
template: './src/index.html',
|
||||||
filename: './index.html',
|
filename: './index.html',
|
||||||
title: 'VLT',
|
title: 'VAULT',
|
||||||
hash: false,
|
hash: false,
|
||||||
// favicon: 'src/sprites/favicon.png',
|
// favicon: 'src/sprites/favicon.png',
|
||||||
});
|
});
|
||||||
|
@ -38,6 +38,7 @@ module.exports = () => {
|
||||||
htmlPlugin,
|
htmlPlugin,
|
||||||
miniCssExractPlugin,
|
miniCssExractPlugin,
|
||||||
new webpack.HashedModuleIdsPlugin(),
|
new webpack.HashedModuleIdsPlugin(),
|
||||||
|
new Dotenv(),
|
||||||
];
|
];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue