File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import { ViteDevServerExecutorOptions } from '../executors/dev-server/schema';
1919import { VitePreviewServerExecutorOptions } from '../executors/preview-server/schema' ;
2020import replaceFiles from '../../plugins/rollup-replace-files.plugin' ;
2121import { ViteBuildExecutorOptions } from '../executors/build/schema' ;
22+ import * as path from 'path' ;
2223
2324/**
2425 * Returns the path to the vite config file or undefined when not found.
@@ -70,9 +71,14 @@ export function getViteSharedConfig(
7071 const projectRoot =
7172 context . projectsConfigurations . projects [ context . projectName ] . root ;
7273
74+ const root = path . relative (
75+ context . cwd ,
76+ joinPathFragments ( context . root , projectRoot )
77+ ) ;
78+
7379 return {
7480 mode : options . mode ,
75- root : projectRoot ,
81+ root,
7682 base : options . base ,
7783 configFile : normalizeViteConfigFilePath ( projectRoot , options . configFile ) ,
7884 plugins : [ replaceFiles ( options . fileReplacements ) as PluginOption ] ,
You can’t perform that action at this time.
0 commit comments