@@ -161,6 +161,7 @@ let commands = {
161161 '--input' : { type : String , description : 'Input file' } ,
162162 '--output' : { type : String , description : 'Output file' } ,
163163 '--watch' : { type : Boolean , description : 'Watch for changes and rebuild as needed' } ,
164+ '--poll' : { type : Boolean , description : 'Poll for changes every so often and rebuild' } ,
164165 '--content' : {
165166 type : String ,
166167 description : 'Content paths to use for removing unused classes' ,
@@ -187,6 +188,7 @@ let commands = {
187188 '-o' : '--output' ,
188189 '-m' : '--minify' ,
189190 '-w' : '--watch' ,
191+ '-p' : '--poll' ,
190192 } ,
191193 } ,
192194}
@@ -367,7 +369,7 @@ async function build() {
367369 let input = args [ '--input' ]
368370 let output = args [ '--output' ]
369371 let shouldWatch = args [ '--watch' ]
370- let shouldPoll = process . platform === 'win32'
372+ let shouldPoll = args [ '--poll' ] || process . platform === 'win32'
371373 let includePostCss = args [ '--postcss' ]
372374
373375 // Polling interval in milliseconds
@@ -751,6 +753,8 @@ async function build() {
751753 }
752754
753755 watcher = chokidar . watch ( [ ...contextDependencies , ...extractFileGlobs ( config ) ] , {
756+ usePolling : shouldPoll ,
757+ interval : pollInterval ,
754758 ignoreInitial : true ,
755759 awaitWriteFinish :
756760 shouldPoll
0 commit comments