Skip to content

Commit

Permalink
Remove unused global var RWJS_WEB_BUNDLER (#8655)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobbe authored Jun 18, 2023
1 parent b2cded5 commit 2384203
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 12 deletions.
1 change: 0 additions & 1 deletion packages/core/config/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ const getSharedPlugins = (isEnvProduction) => {
// The define plugin will replace these keys with their values during build
// time. Note that they're used in packages/web/src/config.ts, and made available in globalThis
new webpack.DefinePlugin({
['RWJS_WEB_BUNDLER']: JSON.stringify('webpack'),
['RWJS_ENV']: JSON.stringify({
RWJS_API_GRAPHQL_URL:
redwoodConfig.web.apiGraphQLUrl ??
Expand Down
2 changes: 0 additions & 2 deletions packages/prerender/ambient.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ declare global {
__REDWOOD__APP_TITLE: string
}

var RWJS_WEB_BUNDLER: 'webpack' | 'vite'

var RWJS_DEBUG_ENV: {
RWJS_SRC_ROOT: string
REDWOOD_ENV_EDITOR?: string
Expand Down
3 changes: 0 additions & 3 deletions packages/prerender/src/internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ export const registerShims = (routerPath: string) => {
RWJS_SRC_ROOT: getPaths().web.src,
}

// For now set bundler to webpack for prerendering
globalThis.RWJS_WEB_BUNDLER = 'webpack'

globalThis.__REDWOOD__PRERENDERING = true

globalThis.__REDWOOD__HELMET_CONTEXT = {}
Expand Down
1 change: 0 additions & 1 deletion packages/vite/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ export default function redwoodPluginVite(): PluginOption[] {
envPrefix: 'REDWOOD_ENV_',
publicDir: path.join(rwPaths.web.base, 'public'),
define: {
RWJS_WEB_BUNDLER: JSON.stringify('vite'),
RWJS_ENV: {
// @NOTE we're avoiding process.env here, unlike webpack
RWJS_API_GRAPHQL_URL:
Expand Down
2 changes: 0 additions & 2 deletions packages/web/ambient.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ declare global {
var __REDWOOD__HELMET_CONTEXT: { helmet?: HelmetServerState }
var __REDWOOD__APP_TITLE: string

var RWJS_WEB_BUNDLER: 'vite' | 'webpack'

// Provided by Vite.config, or Webpack in the user's project
var RWJS_ENV: {
RWJS_API_GRAPHQL_URL: string
Expand Down
3 changes: 0 additions & 3 deletions packages/web/src/global.web-auto-imports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ declare global {
/** URL or absolute path to serverless functions */
RWJS_API_URL: string
__REDWOOD__APP_TITLE: string

// Used by FatalErrorPage to determine how to import the DevFatalErrorPage
RWJS_WEB_BUNDLER: string
}

type GraphQLOperationVariables = Record<string, any>
Expand Down

0 comments on commit 2384203

Please sign in to comment.