Webpack 5 fails due to the way CAF is imported
See original GitHub issueThere is a conflict in the way how CAF is imported on upgrade from Webpack 4 -> 5.
In TaskInstance.ts the current import CAF from "caf"; works with Webpack 4, but crashes on Webpack 5.
For Webpack 5 the code that works is import { CAF } from "caf";.
Edit : I actually can’t check if the stricter import that works in Webpack 5 is working on v4 too or not. If it is - then it is an easy fix.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:46 (20 by maintainers)
Top Results From Across the Web
Webpack 5 entry point now failing on imports - Stack Overflow
Issue. I've check your configuration and found out the issue is importing a .vue file ( App.vue ) into your js file (...
Read more >Compilation errors when building with webpack 5 #24 - GitHub
We are now trying to migrate our projects to Webpack 5 and we have experienced the following kind of errors: ERROR in ./node_modules/react- ......
Read more >Documentation Archive - Apple Developer
Title Resource Type Technology Date
Xcode Release Notes Release Notes 2018‑06...
Apple File System Guide Guides 2018‑06...
Understanding and Detecting OpenGL Functionality Technical Notes OpenGL 2018‑06......
Read more >howler - npm
Description. howler.js is an audio library for the modern web. It defaults to Web Audio API and falls back to HTML5 Audio.
Read more >EJd - River Thames Conditions - Environment Agency - GOV.UK
Starbucks 348th federal way, Digitaler telefonanschluss telekom, ... User manual for samsung galaxy note 5, On nes aimera, Super bowl beyonce minus one, ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@MartinMalinda I’ll try to put my 5 cents on this again (feel free to correct me if I’m wrong and sorry in advance, if I’m talking nonsense). If you look at CAF’s package.json, the default export defined there is :
".": { "import": "./dist/esm/index.mjs", "default": "./index.js" }So, when you do
import whatever-you-want-to -import from "caf", this comes from./dist/esm/index.mjs, which looks like this :export{default as CAF}from"./caf.mjs";export{default as CAG}from"./cag.mjs";export{default as CAFShared}from"./shared.mjs";This means you there is no default export in this file to use and as far as I understand it - you should import like this
import { CAF } from "caf".On other handimport CAF from "caf/caf"would come from./dist/esm/caf.mjswhere the module.exports you mention happens.Sorry for the delay everybody. I’ll double check the situation again this week, hopefully a new compromise has appeared and if not, I’ll release different versions for different platforms and let you know.