Commit 84db8ea 1 parent 16c2a99 commit 84db8ea Copy full SHA for 84db8ea
File tree 2 files changed +9
-12
lines changed
2 files changed +9
-12
lines changed Original file line number Diff line number Diff line change 1
1
import { checkResourceExists } from '../lib/resource-utils.js' ;
2
2
import { generateGraph } from './graph.js' ;
3
3
import { initContext } from './context.js' ;
4
+ import { readAndMergeConfig } from './config.js' ;
4
5
import fs from 'fs/promises' ;
5
- import { readAndMergeConfig as initConfig } from './config.js' ;
6
6
7
7
const generateCompilation = ( ) => {
8
8
return new Promise ( async ( resolve , reject ) => {
@@ -20,7 +20,7 @@ const generateCompilation = () => {
20
20
} ;
21
21
22
22
console . info ( 'Initializing project config' ) ;
23
- compilation . config = await initConfig ( ) ;
23
+ compilation . config = await readAndMergeConfig ( ) ;
24
24
25
25
// determine whether to use default layout or user detected workspace
26
26
console . info ( 'Initializing project workspace contexts' ) ;
Original file line number Diff line number Diff line change 1
- import { readAndMergeConfig as initConfig } from './lifecycles/config.js' ;
1
+ import { readAndMergeConfig } from './lifecycles/config.js' ;
2
+ import { initContext } from './lifecycles/context.js' ;
2
3
import { mergeResponse } from './lib/resource-utils.js' ;
3
4
4
- const config = await initConfig ( ) ;
5
+ const config = await readAndMergeConfig ( ) ;
6
+ const context = await initContext ( { config } ) ;
7
+
5
8
const resourcePlugins = config . plugins
6
9
. filter ( plugin => plugin . type === 'resource' )
7
10
. filter ( plugin => plugin . name !== 'plugin-node-modules:resource' && plugin . name !== 'plugin-user-workspace' )
8
11
. map ( plugin => plugin . provider ( {
9
- context : {
10
- outputDir : new URL ( `file://${ process . cwd ( ) } /public` ) ,
11
- projectDirectory : new URL ( `file://${ process . cwd ( ) } /` ) ,
12
- scratchDir : new URL ( `file://${ process . cwd ( ) } /.greenwood/` )
13
- } ,
14
- config : {
15
- devServer : { }
16
- } ,
12
+ context,
13
+ config,
17
14
graph : [ ]
18
15
} ) ) ;
19
16
You can’t perform that action at this time.
0 commit comments