Fletcher Moore
Fletcher Moore

Reputation: 13814

Brunch and VueJs with Promise polyfill

My code doesn't work in IE and I am having trouble getting to the bottom of it. I need a Promise polyfill, so my goal was to import "babel-polyfill" at my main app.js and see if this worked.

I am running into trouble however, because it seems with VueJs and vue-brunch, somehow the babel code is not being executed in the .vue templates.

I can uses Object.assign in my main app.js file without issue but it does not work in a .vue file. If I remove the line everything otherwise compiles fine.

Upvotes: 0

Views: 466

Answers (1)

Alexey Shvayka
Alexey Shvayka

Reputation: 73

Temporary fix: include vue to babel-brunch extensions:

babel: {
    pattern: /\.(js|vue)$/
}

Also, please make sure babel-brunch is after vue-brunch in package.json.

In future, this won't be necessary because of compiler chaining we are shipping.

Upvotes: 2

Related Questions