labnol / apps-script-starter

Setup a local development environment inside Visual Studio Code and build Google Workspace add-ons with Google Apps Script
https://www.youtube.com/watch?v=KxdCIbeO4Uk
MIT License
1.1k stars 176 forks source link

Add watch mode #44

Closed oshliaer closed 2 years ago

oshliaer commented 3 years ago

Hi!

Hi I am still testing this. But it works well.

Also related #6

Updated 2021-03-10 11:46:02

The code doesn't support Webpack < 5. Please open an issue if you need support for version 4.

oshliaer commented 3 years ago

I'll resolve this. I need test a new version for Webpack 5 and forked-clasp. 2-3 days.

labnol commented 3 years ago

Can we add another command to let the user decide if they wish to push the build immediately on code changes or not?

Also, I am getting this error:

[webpack-cli] TypeError: compiler.plugin is not a function
    at /private/tmp/nn/spawn.js:56:16
    at Array.forEach (<anonymous>)
    at ClassPlugin.apply (/private/tmp/nn/spawn.js:55:29)
    at createCompiler (/private/tmp/nn/node_modules/webpack/lib/webpack.js:71:12)
    at create (/private/tmp/nn/node_modules/webpack/lib/webpack.js:118:16)
    at webpack (/private/tmp/nn/node_modules/webpack/lib/webpack.js:126:47)
    at WebpackCLI.f [as webpack] (/private/tmp/nn/node_modules/webpack/lib/index.js:41:15)
    at WebpackCLI.createCompiler (/private/tmp/nn/node_modules/webpack-cli/lib/webpack-cli.js:1678:29)
    at async WebpackCLI.buildCommand (/private/tmp/nn/node_modules/webpack-cli/lib/webpack-cli.js:1785:20)
    at async Command.<anonymous> (/private/tmp/nn/node_modules/webpack-cli/lib/webpack-cli.js:564:25)
oshliaer commented 3 years ago

compiler.plugin is not a function fires under Webpack 5.

OK. I'll add a decision option.

oshliaer commented 3 years ago

@labnol

You can check it for your environment now.

oshliaer commented 3 years ago

Depends on #48