-
Notifications
You must be signed in to change notification settings - Fork 38
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
console.warn in production #79
Comments
Interesting - I deliberately had those warnings in there to help consumers using the library figure out when their setup wasn't working. Otherwise I would get rid of them completely (I don't need them for development 😄). I wonder what the best approach here is. Can consumers get rid of them when building their production build? Is that something your preset solves? |
by end users I actually meant ..um "actual users" (non-devs, in production) :D
The preset does what solid-js does, there are two different entries shipped, one for development and one for production. So you can have as many warnings in development as neccesary, or perform complarely different logic depending on the env. This is achieved by utilizing export conditions, e.g. // package.json
{
"exports": {
"developmnet": "./dist/dev.js",
"default": "./dist/index.js"
}
} and it works very well, maybe besides solid-start now as there is an issue with module resolution which causes the dev version to be loaded in production as well |
The entries are created from the same source so there is no dupplication. |
Ah, okay - sounds like a win then. Please do a PR 😄 This might be answered in the PR, but I'm curious how this affects the current setup I have? E.g. does it mean I can get rid of the following in
|
There are a lot of warnings emitted from
drag-drop-context.tsx
which should probably be removed in production build as they are not useful for end users and bloat the bundle.I've recently made tsup-preset-solid to help with that so this should be an easy fix
wanna PR? :)
The text was updated successfully, but these errors were encountered: