Issue converting plugin to typescript with webpack
Hi, I'm attempting to convert an umbraco plugin to typescript using webpack, but I'm running into an issue.
When running the website in debug mode, the plugin runs just fine. When I turn debug mode off though, I suddenly get an error when loading my script:
Uncaught TypeError: Object.defineProperty called on non-object
at Function.defineProperty (<anonymous>)
at Function.__webpack_require__.r (script.bundle.js:112:20)
at eval (index.ts:1:21)
at Object../frontend/js/index.ts (script.bundle.js:59:1)
at __webpack_require__ (script.bundle.js:83:41)
at script.bundle.js:123:37
at script.bundle.js:125:12
Does anyone know what this error means, where it comes from and/or how to fix it?
Are there any recommendations when it comes to using typescript when building umbraco plugins?
My test website was running in production mode and smidge had been caching my first build, so obviously nothing worked!!
My first hint was that the exception had the word "webpack" in it, whereas the actual javascript output didn't. After deleting the cache folder, it worked again.
Issue converting plugin to typescript with webpack
Hi, I'm attempting to convert an umbraco plugin to typescript using webpack, but I'm running into an issue.
When running the website in debug mode, the plugin runs just fine. When I turn debug mode off though, I suddenly get an error when loading my script:
Does anyone know what this error means, where it comes from and/or how to fix it?
Are there any recommendations when it comes to using typescript when building umbraco plugins?
I'll gladly provide more details if required.
Ok, I was being silly!
My test website was running in production mode and smidge had been caching my first build, so obviously nothing worked!!
My first hint was that the exception had the word "webpack" in it, whereas the actual javascript output didn't. After deleting the cache folder, it worked again.
is working on a reply...