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

Project.json has the entire node_modules directory published #10

Open
latchkostov opened this issue Nov 4, 2016 · 1 comment
Open

Comments

@latchkostov
Copy link

After using this template successfully and deploying to IIS, I realized that the upload to my server was ~100MB. 99% of that bulk was due to the node_modules being included in the publish.

"publishOptions": {
    "include": [
      "appsettings.json",
      "ClientApp/dist",
      "node_modules",
      "Views",
      "web.config",
      "wwwroot"
    ]
  },

I am not sure if this directory actually needs to be included. But if not, taking that out would be ideal.

@SteveSandersonMS
Copy link
Contributor

It does need to be included if you're using a file-based deployment method (VSTS, or maybe just FTP), because node_modules does have to be present on the server for server-side prerendering to run.

However, if your deployment mechanism automatically does an npm install for you (e.g., when deploying via Git to Azure), then you don't need to include node_modules because the deployment system will recreate it on the server.

So, it does need to be in the template for people using VSTS/FTP/etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants