webpack --watch isn't compiling changed files

后端 未结 30 1080
眼角桃花
眼角桃花 2020-12-02 06:00

I tried running webpack --watch and after editing my JS files, it doesn\'t trigger an auto-recompilation.

I\'ve tried reinstalling webpack

30条回答
  •  萌比男神i
    2020-12-02 06:22

    Possible solution: changing context to the app directory.

    I had all my webpack config files in a sub folder:

    components/
    webpack/
     development.js
    app.js
    

    In webpack/development.js, set context: path.join(__dirname, '../') solved my problem.

提交回复
热议问题