fix: control CodeSee via .env variable (#42428)
This commit is contained in:
committed by
GitHub
parent
49656662a4
commit
65786b6929
@ -1,74 +0,0 @@
|
||||
{
|
||||
"presets": [
|
||||
[
|
||||
"@babel/preset-env",
|
||||
{
|
||||
"loose": true,
|
||||
"modules": false,
|
||||
"useBuiltIns": "usage",
|
||||
"corejs": 2,
|
||||
"shippedProposals": true,
|
||||
"targets": {
|
||||
"browsers": [">0.25%", "not dead"]
|
||||
}
|
||||
}
|
||||
],
|
||||
[
|
||||
"@babel/preset-react",
|
||||
{
|
||||
"useBuiltIns": true,
|
||||
"pragma": "React.createElement"
|
||||
}
|
||||
],
|
||||
"@babel/preset-typescript"
|
||||
],
|
||||
"plugins": [
|
||||
"preval",
|
||||
"@babel/plugin-syntax-dynamic-import",
|
||||
"babel-plugin-macros",
|
||||
[
|
||||
"@babel/plugin-transform-runtime",
|
||||
{
|
||||
"helpers": true,
|
||||
"regenerator": true
|
||||
}
|
||||
],
|
||||
[
|
||||
"babel-plugin-transform-imports",
|
||||
{
|
||||
"react-bootstrap": {
|
||||
"transform": "react-bootstrap/lib/${member}",
|
||||
"preventFullImport": true
|
||||
}
|
||||
}
|
||||
],
|
||||
[
|
||||
"prismjs",
|
||||
{
|
||||
"languages": [
|
||||
"clike",
|
||||
"css",
|
||||
"html",
|
||||
"javascript",
|
||||
"markup",
|
||||
"mathml",
|
||||
"python",
|
||||
"svg",
|
||||
"xml",
|
||||
"sql",
|
||||
"typescript"
|
||||
],
|
||||
"theme": "default",
|
||||
"css": true,
|
||||
"plugins": ["line-numbers"]
|
||||
}
|
||||
]
|
||||
],
|
||||
"env": {
|
||||
"development": {
|
||||
"plugins": [
|
||||
["@codesee/instrument", { "hosted": true }]
|
||||
]
|
||||
}
|
||||
},
|
||||
}
|
75
client/.babelrc.js
Normal file
75
client/.babelrc.js
Normal file
@ -0,0 +1,75 @@
|
||||
require('dotenv').config({ path: '../.env' });
|
||||
const config = {
|
||||
presets: [
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
loose: true,
|
||||
modules: false,
|
||||
useBuiltIns: 'usage',
|
||||
corejs: 2,
|
||||
shippedProposals: true,
|
||||
targets: {
|
||||
browsers: ['>0.25%', 'not dead']
|
||||
}
|
||||
}
|
||||
],
|
||||
[
|
||||
'@babel/preset-react',
|
||||
{
|
||||
useBuiltIns: true,
|
||||
pragma: 'React.createElement'
|
||||
}
|
||||
],
|
||||
'@babel/preset-typescript'
|
||||
],
|
||||
plugins: [
|
||||
'preval',
|
||||
'@babel/plugin-syntax-dynamic-import',
|
||||
'babel-plugin-macros',
|
||||
[
|
||||
'@babel/plugin-transform-runtime',
|
||||
{
|
||||
helpers: true,
|
||||
regenerator: true
|
||||
}
|
||||
],
|
||||
[
|
||||
'babel-plugin-transform-imports',
|
||||
{
|
||||
'react-bootstrap': {
|
||||
transform: 'react-bootstrap/lib/${member}',
|
||||
preventFullImport: true
|
||||
}
|
||||
}
|
||||
],
|
||||
[
|
||||
'prismjs',
|
||||
{
|
||||
languages: [
|
||||
'clike',
|
||||
'css',
|
||||
'html',
|
||||
'javascript',
|
||||
'markup',
|
||||
'mathml',
|
||||
'python',
|
||||
'svg',
|
||||
'xml',
|
||||
'sql',
|
||||
'typescript'
|
||||
],
|
||||
theme: 'default',
|
||||
css: true,
|
||||
plugins: ['line-numbers']
|
||||
}
|
||||
]
|
||||
]
|
||||
};
|
||||
if (
|
||||
process.env.FREECODECAMP_NODE_ENV === 'development' &&
|
||||
process.env.CODESEE === 'true'
|
||||
) {
|
||||
config.plugins.push(['@codesee/instrument', { hosted: true }]);
|
||||
}
|
||||
module.exports = config;
|
@ -65,6 +65,7 @@ RADIO_LOCATION=https://coderadio.freecodecamp.org
|
||||
PEER=stuff
|
||||
DEBUG=true
|
||||
LOCAL_MOCK_AUTH=true
|
||||
CODESEE=false
|
||||
|
||||
# Webhook proxy url from smee.io for PayPal
|
||||
WEBHOOK_PROXY_URL=
|
||||
|
Reference in New Issue
Block a user