Add use client directives to the created mjs wrappers#590
Add use client directives to the created mjs wrappers#590
use client directives to the created mjs wrappers#590Conversation
|
| exports.a = a; | ||
|
|
||
| ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ dist/pkg.cjs.mjs ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ | ||
| 'use client'; |
There was a problem hiding this comment.
now the use client directive is in this file and the one that it reexports (the CJS file) - I think it should be harmless, right?
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #590 +/- ##
=======================================
Coverage 92.38% 92.39%
=======================================
Files 39 39
Lines 2049 2051 +2
Branches 625 639 +14
=======================================
+ Hits 1893 1895 +2
Misses 146 146
Partials 10 10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
fixes bvaughn/react-error-boundary#182
I'm not 100% sure if this should be done at all though. It doesn't solve the case when the directive is in non-entrypoint file.