madskristensen / NpmTaskRunner

Visual Studio extension
Other
88 stars 32 forks source link

Using NPM Task Runner while project is running causes database to re-seed. #55

Open IronSean opened 6 years ago

IronSean commented 6 years ago

Installed product versions

Description

Triggering a build with NPM Task Runner while the project is running (debugging) allows you to refresh the page and see the latest webpack generated bundle. However, this also causes the database seed method to re-run for some reason, delaying the refresh by ~30 seconds.

Steps to recreate

  1. Create a project with an NPM build step
  2. Run the project, view in browser window.
  3. Run build through NPM Task Runner
  4. Refresh project's tab in browser
  5. See database seed method get executed again.

Current behavior

Calling seed on refresh after NPM task runner execution as if code was entirely rebuilt and debugging was starting fresh.

Expected behavior

Rebuilding the front-end bundle with NPM should not cause Entity Framework to attempt to re-seed the database as the models and seeding methods haven't changed.