Skip to content

Explore switching to runtime only build #6

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

Open
addyosmani opened this issue Apr 12, 2017 · 4 comments
Open

Explore switching to runtime only build #6

addyosmani opened this issue Apr 12, 2017 · 4 comments

Comments

@addyosmani
Copy link
Collaborator

From @yyx990803:

FYI if we use the runtime only build we can shave off another ~7kb

From the docs, just switching over to:

module.exports = {
  // ...
  resolve: {
    alias: {
      'vue$': 'vue/dist/vue.esm.js' // 'vue/dist/vue.common.js' for webpack 1
    }
  }
}

with a comment linking up to why we're doing this should do the trick.

We currently already have this kinda setup here https://github.com/vuejs/pwa/blob/prototype/template/build/webpack.base.conf.js#L23 but requires switching to a standalone build. Perhaps we should just nix the standalone check and run it by default.

@maxmilton
Copy link

maxmilton commented May 25, 2017

For a pure SPA it totally makes sense to use the runtime only build. This is great when I have full control over a sites design.

However, in the corporate space, I often have to deal with legacy sites where I have to take a MPA approach and can only introduce Vue progressively. In this case having the compiler is super handy since I can turn output from backend systems into a Vue template dynamically. It's much easier for backend devs to get started with Vue basics too without having to poke around with many frontend assets like *.vue files.

I'm in favour of keeping it as an option during the template init so we've got the choice. However, we could change the default option to "runtime only" and/or update the option description.

P.s. @addyosmani loved your Google I/O presentation this year! ❤️

@addyosmani
Copy link
Collaborator Author

Thanks, @maxmilton! Appreciate the input on this issue as well.

@anubhav7495
Copy link
Collaborator

@addyosmani I believe we should keep the standalone option as a choice for the build but should make the runtime choice as default. Currently standalone gets selected by default.

If this sounds acceptable, I would open a PR for it.
Thanks.

@ragingwind
Copy link
Contributor

I bet make runtime into a default option, and how about support guide documents for mifration like recipes

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

No branches or pull requests

4 participants