-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not compatible with browsers #236
Comments
Ok It could be poossible to solve by using exports condition like is it other tsed module. I’ll try to fix that asap. |
@Romakita that would be awesome! Thanks for the amazingly swift reply as well 🙌 |
@edwinveldhuizen This PR #237 add conditional exports. The bundler will be able to pick the correct compiled code for your env (browser) ;). You don't need to change your actual implementation ^^ (or maybe instrument webpack/vite/whatever, to use the correct alias). See you :) |
🎉 This issue has been resolved in version 6.7.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Description
We have a monorepo with ts.ed projects and nextjs projects.
Because we like the logger library, we have been trying to use it in nextjs as well.
With https://nextjs.org/docs/pages/building-your-application/optimizing/instrumentation we've been able to setup the server-side pretty easily with a custom logger.
We've also setup a custom logger for the browser, however due to creating a default instance in
logger/exports
and not giving the ability to import the Logger class on it's own it's throwing the following errors:Todos
import { Logger } from '@tsed/logger/Logger'
bypassing runninglogger/exports.js
in the browserThe text was updated successfully, but these errors were encountered: