Skip to content
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

How to deploy Node.js using the plugin with Webpack (or similar) #2486

Closed
chearmstrong opened this issue Oct 20, 2020 · 2 comments
Closed

How to deploy Node.js using the plugin with Webpack (or similar) #2486

chearmstrong opened this issue Oct 20, 2020 · 2 comments

Comments

@chearmstrong
Copy link

Hi. I'm pretty new to Azure, so apologies if there is an obvious answer to this question...

If I want to use Webpack (or similar) to create a single file bundle (with tree-shaking and minification, etc), how can I deploy using this plugin.

Also, I have read about run from package - does using something like Webpack still work with this? If so, is there a way to set this option in my code/config or can I only set this manually after deploying?

Thanks in advance.

@ejizba
Copy link
Member

ejizba commented Oct 22, 2020

The Functions team had this old tool that was replaced with the "Run from Package" stuff you were talking about. Check out this issue for more discussion: Azure/azure-functions-pack#84

In terms of our VS Code extension, you can definitely customize it, but I don't have any examples for webpack. There's a few settings to be aware of, all in the .vscode/settings.json file. The "azureFunctions.deploySubpath" setting controls what we deploy, defaulted to the root of the repo for JavaScript. The "azureFunctions.preDeployTask" controls what task to run before deploying, which you can configure to be whatever you want (for example, maybe a webpack task).

@chearmstrong
Copy link
Author

@EricJizbaMSFT Thanks for the info - that's really useful.

@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants