Hi, we are trying to convert our project from using ts-loader to swc-loader.
After installing the node modules and setting up loader: 'swc-loader' in our webpack files, I'm seeing the below errors occurring.
Terminal error when running docker-compose up --build:
ERROR in ./src/client/pages/main/index.tsx
Module build failed (from ./node_modules/swc-loader/src/index.js):
Error: Bindings not found.
at Compiler.<anonymous> (/opt/app/node_modules/@swc/core/index.js:224:19)
at Generator.next (<anonymous>)
at /opt/app/node_modules/@swc/core/index.js:34:71
at new Promise (<anonymous>)
at __awaiter (/opt/app/node_modules/@swc/core/index.js:30:12)
at Compiler.transform (/opt/app/node_modules/@swc/core/index.js:201:16)
at Object.transform (/opt/app/node_modules/@swc/core/index.js:343:21)
at Object.<anonymous> (/opt/app/node_modules/swc-loader/src/index.js:86:21)
Terminal error when running npm run build:
ERROR in ./src/client/pages/main/index.tsx
Module build failed (from ./node_modules/swc-loader/src/index.js):
Error: unknown field `onlyCompileBundledFiles` at line 1 column 350
Hi, we are trying to convert our project from using ts-loader to swc-loader.
After installing the node modules and setting up
loader: 'swc-loader'
in our webpack files, I'm seeing the below errors occurring.Terminal error when running
docker-compose up --build
:Terminal error when running
npm run build
:Added to package.json and installed:
Example webpack config:
.swrc file added
Other information: