Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused global var RWJS_WEB_BUNDLER #8655

Merged
merged 1 commit into from
Jun 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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