File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,15 @@ import {context} from './env.config.js';
6
6
* Should be replaced with OOTB solution when https://github.com/11ty/eleventy-dev-server/issues/28 will be resolved
7
7
*/
8
8
export default ( config ) => {
9
+ // Should be in serve mode
10
+ if ( ! process . argv . includes ( '--serve' ) ) return ;
11
+ // Applicable for clear dev env only
9
12
if ( ! context . isDev || context . isE2E ) return ;
10
13
config . on ( 'eleventy.after' , async ( ) => {
11
- const { port } = config . serverOptions ;
14
+ const { port} = config . serverOptions ;
12
15
if ( ! port || global . hasOpened ) return ;
13
16
await outUrl . open ( `http://localhost:${ port } ` ) ;
17
+ // eslint-disable-next-line require-atomic-updates
14
18
global . hasOpened = true ;
15
19
} ) ;
16
20
} ;
Original file line number Diff line number Diff line change 47
47
"executor" : " nx:noop" ,
48
48
"dependsOn" : [
49
49
" esl-website:build:assets" ,
50
- " esl-website:build:eleventy" ,
50
+ " esl-website:build:eleventy"
51
51
]
52
52
},
53
53
"build:eleventy" : {
59
59
"dependsOn" : [" ^build:docs" ],
60
60
"cache" : true ,
61
61
"inputs" : [
62
+ " {projectRoot}/11ty/**/*" ,
62
63
" {projectRoot}/src/**/*" ,
63
- " {projectRoot}/views/**/*"
64
+ " {projectRoot}/views/**/*" ,
65
+ " {projectRoot}/.eleventy.js"
64
66
],
65
67
"outputs" : [
66
68
" {projectRoot}/dist/**/*"
You can’t perform that action at this time.
0 commit comments