Skip to content

Example app should use runtime-only version of vue? #300

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
RavenXce opened this issue Apr 28, 2017 · 4 comments
Closed

Example app should use runtime-only version of vue? #300

RavenXce opened this issue Apr 28, 2017 · 4 comments

Comments

@RavenXce
Copy link
Contributor

The hello world example app is currently referencing the full version of vue which includes the compiler. This isn't really needed and isn't the default way of running Vue applications (import Vue from 'vue' defaults to the runtime version).

Should the example use this style instead? : vuejs-templates/webpack#215 (comment)

@RavenXce RavenXce changed the title Example app and sample config should use runtime-only version of vue? Example app should use runtime-only version of vue? Apr 28, 2017
@gauravtiwari
Copy link
Member

@RavenXce Feel free to make a PR please 👍 Looks good to me

RavenXce added a commit to RavenXce/webpacker that referenced this issue Apr 29, 2017
This gives a better convention to start users of with -
all templates are pre-compiled through webpack/vue-loader,
and the runtime-only version of vue is imported instead.

Resolves rails#300.
gauravtiwari pushed a commit that referenced this issue Apr 29, 2017
This gives a better convention to start users of with -
all templates are pre-compiled through webpack/vue-loader,
and the runtime-only version of vue is imported instead.

Resolves #300.
@irrg
Copy link

irrg commented May 25, 2017

Possibly related, possibly worth a new issue (possibly worth telling me I'm Doing It Wrong)… I tried to modify the new example to use vue-router. Could never get past Unknown custom element: <router-view> etc.

Considering vue-router (and vuex) are staples…I'd love to see an example that shows what I'm doing wrong.

@RavenXce
Copy link
Contributor Author

RavenXce commented May 26, 2017

That doesn't seem related to this issue. Did you add the component during initialization?

import VueRouter from ...

MyComponent = new Vue({
   ...,
   components: { VueRouter, ... },
   ...,
});

Reference: https://vuejs.org/v2/guide/components.html#Local-Registration

@irrg
Copy link

irrg commented May 26, 2017

I finally got a router to work within the context of webpacker (example: https://github.com/irrg/rails-webpacker-vue-example) but I haven't been able to port my Vue into it yet. I'll figure it out and if needed ask help elsewhere.

That said, the moment I tried to add hot reloading to my linked example, vue-router broke again. So some stuff definitely feels fickle, but it's likely outside of the scope of the webpacker project (and probably firmly in webpack's camp).

sensiblegame added a commit to sensiblegame/webpack that referenced this issue Oct 23, 2017
This gives a better convention to start users of with -
all templates are pre-compiled through webpack/vue-loader,
and the runtime-only version of vue is imported instead.

Resolves rails/webpacker#300.
KingTiger001 added a commit to KingTiger001/Rails-web-pack-project that referenced this issue Jan 15, 2023
This gives a better convention to start users of with -
all templates are pre-compiled through webpack/vue-loader,
and the runtime-only version of vue is imported instead.

Resolves rails/webpacker#300.
smartech7 pushed a commit to smartech7/ruby-webpacker that referenced this issue Aug 4, 2023
This gives a better convention to start users of with -
all templates are pre-compiled through webpack/vue-loader,
and the runtime-only version of vue is imported instead.

Resolves rails/webpacker#300.
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

3 participants