fix: 'bake' release env variables at build time
This commit is contained in:
parent
7d244dfa1f
commit
b017590033
|
@ -183,6 +183,7 @@
|
|||
"babel-eslint": "^10.1.0",
|
||||
"babel-jest": "^26.2.2",
|
||||
"babel-loader": "^8.1.0",
|
||||
"babel-plugin-transform-inline-environment-variables": "^0.4.3",
|
||||
"eslint": "^7.6.0",
|
||||
"eslint-config-react-app": "3.0.6",
|
||||
"eslint-plugin-flowtype": "^5.2.0",
|
||||
|
@ -212,4 +213,4 @@
|
|||
"js-yaml": "^3.13.1"
|
||||
},
|
||||
"version": "0.52.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,6 +17,15 @@
|
|||
]
|
||||
],
|
||||
"plugins": [
|
||||
"transform-class-properties"
|
||||
"transform-class-properties",
|
||||
[
|
||||
"transform-inline-environment-variables",
|
||||
{
|
||||
"include": [
|
||||
"SOURCE_COMMIT",
|
||||
"SOURCE_VERSION"
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
|
@ -50,9 +50,7 @@ module.exports = {
|
|||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
"process.env.SOURCE_COMMIT": JSON.stringify(process.env.SOURCE_COMMIT),
|
||||
"process.env.SOURCE_VERSION": JSON.stringify(process.env.SOURCE_VERSION),
|
||||
"EDITOR_VERSION": JSON.stringify(pkg.version)
|
||||
EDITOR_VERSION: JSON.stringify(pkg.version)
|
||||
}),
|
||||
new webpack.ProvidePlugin({
|
||||
fetch: 'imports-loader?this=>global!exports-loader?global.fetch!isomorphic-fetch',
|
||||
|
|
|
@ -2504,6 +2504,11 @@ babel-plugin-transform-class-properties@^6.24.1:
|
|||
babel-runtime "^6.22.0"
|
||||
babel-template "^6.24.1"
|
||||
|
||||
babel-plugin-transform-inline-environment-variables@^0.4.3:
|
||||
version "0.4.3"
|
||||
resolved "https://registry.yarnpkg.com/babel-plugin-transform-inline-environment-variables/-/babel-plugin-transform-inline-environment-variables-0.4.3.tgz#a3b09883353be8b5e2336e3ff1ef8a5d93f9c489"
|
||||
integrity sha1-o7CYgzU76LXiM24/8e+KXZP5xIk=
|
||||
|
||||
babel-preset-current-node-syntax@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.0.tgz#cf5feef29551253471cfa82fc8e0f5063df07a77"
|
||||
|
|
Reference in New Issue