You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey! Just found this package after looking for something more up-to-date than typescript-memoize and so far it looks great! However, I'm having some difficulty building it into my project.
When trying to import the Memoize method into my Typescript project, as outlined in the docs, I'm getting the warning below with Webpack:
ERROR in ./node_modules/.pnpm/@[email protected]/node_modules/@boost/decorators/esm/index.js 243:0
Module parse failed: 'import' and 'export' may appear only with 'sourceType: module' (243:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| }
|>export { Bind, Debounce, Deprecate, Memoize, Throttle };| //# sourceMappingURL=index.js.map|
@ ./application/index.ts 3:0-16
webpack 5.87.0 compiled with 1 error in 7774 ms
I noticed that when I changed the type key to module in the @boost/decoratorspackage.json file, it imported successfully! However, I recognise that it isn't sustainable, and from what I can determine on the migrations to 4.0 page, is a deliberate decision.
Is there something I'm missing? I feel like there's an obvious oversight of mine here, but I'm not sure what to do to make it play nicely.
Details of my config and versions below.
Thanks!
Webpack config (trimmed for confidentiality/brevity):
Sorry for the delay! It should just be building to a standard IIFE-style bundle, for browser consumption. Based on the webpack docs, it looks like that for the default target of web, it's default output.chunkFormat is array-push.
Is it likely that this is because the rest of my codebase is typescript, and thus being parsed by ts-loader, whereas this module is not because it's already transpiled down to JS ESM? (I'm happy for this to be a my-side-of-things problem, but I didn't know where to start diving in).
Hey! Just found this package after looking for something more up-to-date than typescript-memoize and so far it looks great! However, I'm having some difficulty building it into my project.
When trying to import the
Memoize
method into my Typescript project, as outlined in the docs, I'm getting the warning below with Webpack:I noticed that when I changed the
type
key tomodule
in the@boost/decorators
package.json file, it imported successfully! However, I recognise that it isn't sustainable, and from what I can determine on the migrations to 4.0 page, is a deliberate decision.Is there something I'm missing? I feel like there's an obvious oversight of mine here, but I'm not sure what to do to make it play nicely.
Details of my config and versions below.
Thanks!
Webpack config (trimmed for confidentiality/brevity):
My webpack and typescript versions are:
The text was updated successfully, but these errors were encountered: