Skip to content

Disable Hot Reload by option #1036

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

Closed
gejgalis opened this issue Nov 2, 2017 · 4 comments
Closed

Disable Hot Reload by option #1036

gejgalis opened this issue Nov 2, 2017 · 4 comments

Comments

@gejgalis
Copy link

gejgalis commented Nov 2, 2017

What problem does this feature solve?

We have built in our project Hot Module Replacement on higher level abstraction and vue-loader prevents our module.hot.accept() trigger. We need to turn off vue-loader Hot Reload feature to be able to use our HMR.

For end user experience - there will be additional option which may be used to disable Hot Reload staying in "development" environment. NOTE: we don't need to disable HMR in styles - this part doesn't break our functionality.

What does the proposed API look like?

module: {
  rules: [
    {
      test: /\.vue$/,
      loader: 'vue-loader',
      options: {
        hotReload: false // disables Hot Reload
      }
    }
  ]
}

I will contribute PullRequest in next few hours.

gejgalis added a commit to gejgalis/vue-loader that referenced this issue Nov 2, 2017
@gejgalis
Copy link
Author

gejgalis commented Nov 2, 2017

BTW after @yyx990803 commit: d8c82d5 Hot Reload is broken. Tested in generated project using: vue init foo

@yyx990803
Copy link
Member

@gejgalis thanks for pointing that out, addressed in 153d237.

As for the option to disable HMR, a PR is welcome.

@gejgalis
Copy link
Author

gejgalis commented Nov 4, 2017

@yyx990803 I did PR already #1037

gejgalis added a commit to gejgalis/vue-loader that referenced this issue Nov 4, 2017
Change-Id: I5cb9bd55d9750c8dd6722dabfecf832fc178113d
gejgalis added a commit to gejgalis/vue-loader that referenced this issue Nov 5, 2017
gejgalis added a commit to gejgalis/vue-loader that referenced this issue Nov 5, 2017
@Jinjiang
Copy link
Member

@yyx990803 @LinusBorg I guess this issue has been solved and could be closed.
Thanks.

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

4 participants