Axios gives an error after building as a library TypeError: (0 , _axios.default) is not a function #5745
Unanswered
Dmitriy-Krivetsky
asked this question in
Q&A
Replies: 1 comment
-
Did you ever solve it? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Axios version: 1.4.0
I have two packages (core and my package)
I make requests in the core package
In core package requests work, as soon as I make a build and run in my package I get an error:
TypeError: (0 , _axios.default) is not a function
The package is assembled without minify
rm -rf dist && NODE_ENV=production babel src/lib --out-dir dist --copy-files
I've tried a build with minify via vite - it works, but at the moment it's not the right solution for us
Downgrading to 1.1.2 also had no effect
Example code:
Beta Was this translation helpful? Give feedback.
All reactions