-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
How do you use other NPM modules? #14
Comments
I think we should pack the external packages into dist when deploy. We could use npm to resolve all the external dependencies which are stated in webpack config. |
Hi guys, I have some issues with the current approach, please see my PR for details: #18 |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Suppose I want to use a third party lib such as
axios
how do I go about doing that?If I
import * as axios from "axios";
then runsls webpack serve
I get the following error:If I include
axios
in the externals of webpack.config.js:The code runs but after
sls deploy
I get the following error when I try to run the function:Any ideas? Perhaps an example that uses a third party lib would be good?
The text was updated successfully, but these errors were encountered: