Skip to content

Commit

Permalink
optional base path for backend bundling config (#934)
Browse files Browse the repository at this point in the history
  • Loading branch information
HughParry authored Jan 10, 2024
1 parent 28f3c17 commit 40e91dc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dev/config/src/vite/vite.backend.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,16 @@ export default async function (
packageDir: string,
entry: string,
command?: string,
mode?: string
mode?: string,
optionalBaseDir = '../..'
): Promise<UserConfig> {
const isProduction = mode === 'production'

// Get all dependencies of the current package
const { dependencies: deps, optionalPeerDependencies } = await getDependencies(packageName, true)

// Assuming node_modules are at the root of the workspace
const baseDir = path.resolve('../..')
const baseDir = path.resolve(optionalBaseDir)
const nodeModulesDir = path.resolve(baseDir, 'node_modules')

// Output directory is relative to directory of the package
Expand Down

0 comments on commit 40e91dc

Please sign in to comment.