hcaptcha sitekey in external config file
This commit is contained in:
1 parent
e8855252ca
commit
94c8dc266d
4 files changed
+12
-10
No files matched your search
@@ -0,0 +1 @@
|
||||
.env.*
|
||||
+2
-2
@@ -70,9 +70,9 @@
|
||||
"webpack-dev-server": "^3.10.3"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "webpack-dev-server --mode development --devtool inline-source-map",
|
||||
"dev": "webpack-dev-server --env.file=development --mode development --devtool inline-source-map",
|
||||
"build": "webpack",
|
||||
"production": "NODE_ENV='production' && webpack --mode production && node server",
|
||||
"production": "NODE_ENV='production' && webpack --env.file=production --mode production && node server",
|
||||
"start": "node server",
|
||||
"test": "react-scripts test --env=jsdom",
|
||||
"eject": "react-scripts eject",
|
||||
|
||||
@@ -4,7 +4,6 @@ import ReactLoading from 'react-loading'
|
||||
import { Link } from 'react-router-dom'
|
||||
import Button from "../../components/Button"
|
||||
import ResultItem from "../../components/ResultItem"
|
||||
|
||||
import { cleanSearchQuery, updateTitle } from '../../utils'
|
||||
|
||||
import './styles.scss'
|
||||
@@ -275,8 +274,8 @@ export default class AddFeed extends React.PureComponent<IProps> {
|
||||
/>
|
||||
</div>
|
||||
<HCaptcha
|
||||
// TODO: replace this
|
||||
sitekey="00000001-0000-0001-0000-000000000001"
|
||||
//sitekey="00000001-0000-0001-0000-000000000001"
|
||||
sitekey={process.env.HCAPTCHA_SITE_KEY}
|
||||
onVerify={this.setToken}
|
||||
onError={this.onError}
|
||||
onExpire={this.onExpire}
|
||||
|
||||
+7
-5
@@ -1,10 +1,9 @@
|
||||
const path = require('path')
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||
const FaviconsWebpackPlugin = require('favicons-webpack-plugin')
|
||||
const dotenv = require('dotenv')
|
||||
dotenv.config()
|
||||
const Dotenv = require('dotenv-webpack');
|
||||
|
||||
module.exports = {
|
||||
module.exports = env => ({
|
||||
watch: false,
|
||||
mode: 'production',
|
||||
devtool: false,
|
||||
@@ -125,6 +124,9 @@ module.exports = {
|
||||
yandex: false
|
||||
}
|
||||
}
|
||||
})
|
||||
}),
|
||||
new Dotenv({
|
||||
path: `./.environments/.env${env.file ? `.${env.file}` : ''}`
|
||||
}),
|
||||
],
|
||||
}
|
||||
})
|
||||
Reference in new issue
Block a user