JeffreyWay / Laravel-Elixir-Rollup

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

it is possible to override rollup plugins options? #16

Open RomanLavrinenko opened 7 years ago

RomanLavrinenko commented 7 years ago

i use vue and vuex in my laravel project with object spread syntax like:

...
 computed: {
            ...mapGetters({
                ...
            })
        },
...

also i use elixir tool i try to do it like this:

...

var rollupConf = {
  format: 'iife',
  sourceMap: true,
  useStrict: false,
  plugins: [
    nodeResolve({
      jsnext: true,
      main: true,
      browser: true
    }),
    vue(),
    json(),
    babel({
      exclude: 'node_modules/**'
    }) 
  ]
};

elixir(function(mix) {
  mix
    .rollup(
      './resources/assets/js/foo.js',
      './public/js/bar.js',
      null,
      rollupConf
    )
});

but got next error: [Laravel Elixir] Rollup Compilation Failed!: Error transforming /foo.vue with 'buble' plugin: Object spread operator requires specified objectAssign option with 'Object.assign' or polyfill helper.

also i tried this option:

buble(
      { objectAssign: 'Object.assign()' }
    ),

and got that error again.

As i can see I can't override default rollup plugins options defined in Laravel-Elixir-Rollup plugin (only add new plugins)

Is it possible to resolve this issue?

fabis94 commented 5 years ago

any updates? still having this issue

bennyschudel commented 5 years ago

I have the same issue. How do I modify the vue plugin options?