Closed asolopovas closed 1 year ago
This is a limitation of custom functions specifically. You have to shut down dev-server make the change, rebuild, and restart. The problem is with the functions file which has to be handled in a special way because it's not loaded in the add-in in the same way everything else is. It's used to generate a different file a custom webpack plugin and this file is sent to excels separate loading process for function and it doesn't currently support hot reloading. This is something we should have on our backlog.
It doesn't have to hot reloaded, at least if it was reloading the plugin on each save and not throw various errors. Because if I have to rebuild package for 10 15 second on each change its easier to develop plugin outside the ecosystem of microosft and then import it with script lab.
Saving a file triggers hot-reloading in webpack and that is the point of incompatibility with custom functions (which is what the errors are complaining about). It looks like someone else has come up with a solution (though I'm not sure why that works).
https://github.com/OfficeDev/Excel-Custom-Functions/issues/319#issuecomment-1248207298
Hi I have been to get the template fixed in stackoverflow but nobody seems to have an answer.
Basically If I start a dev server and then change for example taskpane.html I get the following errors in the console.
YOU MAY DELETE THE PREREQUISITES SECTION.
Expected behavior
I am expecting to open https://localhost:3000/taskpane.html and see the outup update rather then throw a bunch of errors on change in a fresh project.
Current behavior
With dev-server task running I try to edit taskpane.html the dev-server task throws a bunch of error on change described above.
Steps to Reproduce
https://github.com/asolopovas/excel-fn-test
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
Operating System: Edition Windows 10 Pro Version 21H2 Installed on 14/Apr/22 OS build 19044.1889 Experience Windows Feature Experience Pack 120.2212.4180.0
Node version: v16.16.0
Office version: Microsoft® Excel® for Microsoft 365 MSO (Version 2207 Build 16.0.15427.20166) 32-bit
Tool version: 1.9.1