K
K
kartio2015-11-12 16:06:09
JavaScript
kartio, 2015-11-12 16:06:09

What am I doing wrong with babel 6.0?

Hi all!
Tell me what's wrong.
I decided to update the dependencies in the webpack project and as a result, babel was updated to 6.0.
Babel-loader suddenly broke (although it was also updated), it gives an error
Unexpected token
on import and export in modules.
Moreover, these are not some specific files like jsx and the like, where there is a chain of loaders, but ordinary js, for example, swears at
import _ from 'lodash';
or
export default {
a: 1
}
i.e. on the primitive itself.
maybe some special options appeared, what format or what loaders to use?
all packages are fresh and just because something did not google the answer to your question.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vladimir, 2015-11-12
@Vovchikvoin

Version 6 is not yet stable, the developers themselves talked about this, so for now I advise you to return to 5.

Y
Yaroslav Lyzlov, 2015-11-12
@dixoNich

+1. Babel 6 is inadequate.

K
kartio, 2015-11-12
@kartio

I decided to make a test webpack config with babel 6.0 loaders from scratch, everything works as expected, you will either have to roll back, or review all configs and dependencies, some kind of magic.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question