Describe the bug
When I build an application which uses iconoir-react package for production and try to run remix-kit preview, I get this error:

What I tried:
- Added
'type': 'module' in package.json
- Added
'iconoir-react': 'iconoir-react/dist/esm' in resolve.alias
- Changed from server.production.js to server.production.mjs
- Added
serverDependenciesToBundle: ['iconoir-react'] in remix.config.js
The development server works like a charm, but production preview throws. Also the same remix project using the default build system works too.
Reproduction
No response
Steps to reproduce
- Create a remix-kit project
- Add iconoir-react
- Build for production
- Try to run
remix-kit preview
System Info
System:
OS: macOS 13.1
CPU: (10) arm64 Apple M1 Pro
Memory: 108.45 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.12.1 - ~/.asdf/installs/nodejs/lts-hydrogen/bin/node
Yarn: 1.22.19 - ~/.asdf/shims/yarn
npm: 8.19.2 - ~/.asdf/plugins/nodejs/shims/npm
Browsers:
Firefox: 107.0.1
Safari: 16.2
npmPackages:
@remix-kit/cli: ^0.1.2 => 0.1.2
@remix-kit/react: ^0.1.2 => 0.1.2
@remix-kit/vite: ^0.1.2 => 0.1.2
@remix-run/dev: ^1.9.0 => 1.9.0
@remix-run/express: ^1.9.0 => 1.9.0
@remix-run/node: ^1.9.0 => 1.9.0
@remix-run/react: ^1.9.0 => 1.9.0
@remix-run/serve: ^1.9.0 => 1.9.0
@remix-run/server-runtime: ^1.9.0 => 1.9.0
Used Package Manager
pnpm
Validations
Describe the bug
When I build an application which uses iconoir-react package for production and try to run remix-kit preview, I get this error:
What I tried:
'type': 'module'in package.json'iconoir-react': 'iconoir-react/dist/esm'in resolve.aliasserverDependenciesToBundle: ['iconoir-react']in remix.config.jsThe development server works like a charm, but production preview throws. Also the same remix project using the default build system works too.
Reproduction
No response
Steps to reproduce
remix-kit previewSystem Info
System: OS: macOS 13.1 CPU: (10) arm64 Apple M1 Pro Memory: 108.45 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 18.12.1 - ~/.asdf/installs/nodejs/lts-hydrogen/bin/node Yarn: 1.22.19 - ~/.asdf/shims/yarn npm: 8.19.2 - ~/.asdf/plugins/nodejs/shims/npm Browsers: Firefox: 107.0.1 Safari: 16.2 npmPackages: @remix-kit/cli: ^0.1.2 => 0.1.2 @remix-kit/react: ^0.1.2 => 0.1.2 @remix-kit/vite: ^0.1.2 => 0.1.2 @remix-run/dev: ^1.9.0 => 1.9.0 @remix-run/express: ^1.9.0 => 1.9.0 @remix-run/node: ^1.9.0 => 1.9.0 @remix-run/react: ^1.9.0 => 1.9.0 @remix-run/serve: ^1.9.0 => 1.9.0 @remix-run/server-runtime: ^1.9.0 => 1.9.0Used Package Manager
pnpm
Validations