ithack / ithack.github.io

我的前端博客,访问地址:
https://ithack.github.io
2 stars 1 forks source link

onchange自动打包没有反应,concurrently多任务同步编译 #23

Open ithack opened 4 years ago

ithack commented 4 years ago

image image 修改完代码并且保存了,但是run watch没反应?

如果你是windows系统用户,需要特别注意的是,在windows环境下,不支持

"watch": "onchange ‘src/*/.js\‘ ‘src/*/.less‘ -- npm run webpack"

这种双引号包裹单引号的写法,需要如上代码用反斜杠进行转义,否则会自动打包失败

改成:"watch": "onchange \"src/*/.js\" \"src/*/.less\" -- npm run webpack"

concurrently 支持多进程编译"start":"concurrently \"npm run format\" \"craco start\"",