Skip to content

Commit 24ab582

Browse files
authored
Merge pull request #716 from redwoodjs/pp-fix-redwood-private-vars
Fix Redwood private vars.
2 parents 5d29127 + ad03482 commit 24ab582

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

packages/core/config/webpack.common.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,12 @@ module.exports = (webpackEnv) => {
166166
// The define plugin will replace these keys with their values during build
167167
// time.
168168
new webpack.DefinePlugin({
169-
__RW__API_PROXY_PATH: JSON.stringify(redwoodConfig.web.apiProxyPath),
169+
// Flag to determine if we're in a Redwood Project
170+
__REDWOOD__: JSON.stringify(true),
171+
// The Path to the Serverless Functions
172+
__REDWOOD__API_PROXY_PATH: JSON.stringify(
173+
redwoodConfig.web.apiProxyPath
174+
),
170175
...getEnvVars(),
171176
}),
172177
new Dotenv({

packages/web/src/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
/* eslint-disable no-undef */
22
// These values are replaced by the webpack define plugin
3-
window.__REDWOOD__API_PROXY_PATH = __RW__API_PROXY_PATH
3+
window.__REDWOOD__API_PROXY_PATH = __REDWOOD__API_PROXY_PATH

0 commit comments

Comments
 (0)