-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Why __export function handle 「lodash-es/debounce」 module wrap with an additional function #1477
Comments
I use package alias: |
I'm not sure I understand what you're saying. But
What version of esbuild are you using? Any chance this has already been fixed by #1338? The |
Thank for your reply.
source code is very simple. // tracker.ts is an es module
import { debounce } from 'lodash-es';
class ImageTracker {
collectResolvedImagesInfoBatchly: any = debounce(this.collectResolvedImagesInfo, 3000);
collectResolvedImagesInfo() {}
}
export const docImageTracker = new ImageTracker(ImageType.DOC_IMAGE);
Your words remind me that
My esbuild version is |
As evan said, we need enough code to figure out what's going on. Please provide a complete and minimal reproduce repo, instead of code snippets. |
Sorry I cant provide a complete code becouse it used private npm package within the company. But I check the esbuild version again. it's throw problem with there is no question and the issue can be closed. |
Context
This is a npm package A
peerDependency
with「lodash-es」package;there is inner source code:we use esbuild:
./node_modules/.bin/esbuild index.ts --bundle --outfile=out.js
we can find the code in
out.js
package A is an umd bundle by webpack4。the out.js can be upload together in this issue;
problem:
the value of
c2
in runtime is{ default: { default: funtion debounce } }
;code #2
throw an error :(0 , c2.default) is not a function
;question
code#1
use another function wrap debounce_default?code#1
?expected
the value of
c2
in runtime to be{ default: funtion debounce() {} }
。or __exportcode#1
width __esModuleThanks ~
outjs.zip
The text was updated successfully, but these errors were encountered: