JeffreyWay / Laravel-Elixir-Rollup

Official Rollup extension for Laravel Elixir. (Includes support for .vue files).
29 stars 12 forks source link

Vue 2 support? #10

Closed aedart closed 5 years ago

aedart commented 8 years ago

I have been trying to get Vue 2 to work with rollup, using this elixir extension. Unfortunately it does not appear to work that well.

The problem

It appears that the rollup-plugin-vue cannot handle the Vue 2 's templates, due to the usage of with statements (assuming this is Vue 2 internal).

Possible solution

Perhaps using this plugin could resolve the issue. But not too sure about the way they are doing it.

I did attempt to use this plugin locally, by using a rollup.config.js, yet gulp fails at the import statements (import vue from 'rollup-plugin-vue2';)... uh, ... Hope that you (or someone) can help.

JeffreyWay commented 8 years ago

Coming soon.

aedart commented 8 years ago

Ok - ty :)

patricksamson commented 8 years ago

Any news on this issue? rollup-plugin-vue2 seems nice, but looks like it needs another plugin to bundle the CSS. I might try to implement it, but all these compilers and transpilers are difficult to debug!

dzava commented 8 years ago

Both plugins rollup-plugin-vue and rollup-plugin-vue2 use vue-template-compiler which produces templates that use with, rollup-plugin-vue2 works because it disables strict mode, which you can do in rollup.config.js

zackkrida commented 8 years ago

@dzava how does one disable strict mode within a rollup.config.js file? I can't find documentation on this anywhere.

Regardless, I'd love to see this working with Vue 2 single-file components.

dzava commented 8 years ago

@zackcote set useStrict to false.

There is a template compiler that makes render functions compatible with strict mode and looks like rollup-plugin-vue2 can be used in strict mode.