mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 15:12:02 +00:00
make DEV_WEB_BUILDER_OMIT_SLOW_DEPS work with pnpm (#47067)
The DEV_WEB_BUILDER_OMIT_SLOW_DEPS env var is an experimental dev env var for faster builds that I sometimes use. When using it, the packageResolution plugin needs the same fix as the one for stylePlugin in https://github.com/sourcegraph/sourcegraph/pull/46452 to work with pnpm. This is a generally sensible fix that implements the correct and desirable behavior, not just a way to make a hack work.
This commit is contained in:
parent
4405a2c6ef
commit
316ccbac57
@ -3,7 +3,7 @@ import fs from 'fs'
|
||||
import { CachedInputFileSystem, ResolverFactory } from 'enhanced-resolve'
|
||||
import * as esbuild from 'esbuild'
|
||||
|
||||
import { NODE_MODULES_PATH } from '../paths'
|
||||
import { NODE_MODULES_PATH, WORKSPACE_NODE_MODULES_PATHS } from '../paths'
|
||||
|
||||
interface Resolutions {
|
||||
[fromModule: string]: string
|
||||
@ -22,7 +22,7 @@ export const packageResolutionPlugin = (resolutions: Resolutions): esbuild.Plugi
|
||||
fileSystem: new CachedInputFileSystem(fs, 4000),
|
||||
extensions: ['.ts', '.tsx', '.js', '.jsx', '.json'],
|
||||
symlinks: true, // Resolve workspace symlinks
|
||||
modules: [NODE_MODULES_PATH],
|
||||
modules: [NODE_MODULES_PATH, ...WORKSPACE_NODE_MODULES_PATHS],
|
||||
unsafeCache: true,
|
||||
})
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user