feat!: support multiline values in env files#10826
Conversation
|
Thanks for splitting the PR! It would be nice if we could have a better error message for #6858. |
|
@sapphi-red I'm trying to fix |
Unless we have a hardcoded error check for the split undefined bug, I think it would be nicer if it's fixed upstream 🤔 |
Can we re-implement dotenv-expand in vite? |
|
I think it's better to keep it upstream for now so it gets bug fixes and we can refer to its docs. |
Yeah, I think it would be better to be fixed in upstream. But until that get fixed, I think we should improve the error message on our side. Something like: try {
expand()
} catch (e) {
if (e.message.includes('split') {
throw new Error('dotenv-expand failed to expand env vars. Maybe you need to escape `$`?')
}
throw e
}Without that, I suppose we'll receive many bug reports. |
|
I'd be fine with a custom error check for now too 👍 |
|
Let's merge and improve the error message in a follow-up PR. Let us know if you want to take that @Dunqing. I want to include this already in the next patch. |
|
@Dunqing Just to confirm, do you plan to take the error one? I'll take that if you don't. |
Sorry, I'll do that soon. |
|
@Dunqing OK. No rush 👍🏼 |
Co-authored-by: bluwy <bjornlu.dev@gmail.com> close vitejs#10149
Description
close: #10149
related PR: #10370
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123).