I've been on Stack for a couple hours. I'm using gulp and I'm trying to get my build process set up.
It looks like this to build the js.
gulp.task('buildJS', function () {
browserify('./browser/js/main.js')
.transform('babelify',
{
presets: ["es2015", "react"],
plugins: ['transform-class-properties', "transform-object-rest-spread", "transform-decorators-legacy"]
})
.bundle()
.pipe(source('bundle.js'))
.pipe(gulp.dest('./dist'));
});
This ends up giving me this error:
events.js:141
throw er; // Unhandled 'error' event
^
SyntaxError: Unexpected character '@'
My babelrc looks like this:
{
"presets": ["es2015", "react"],
"plugins": ["transform-object-rest-spread","transform-class-properties", "transform-decorators-legacy"]
}
So it feels like the transform-decorators-legacy is not working.
I am using "babel-core": "^6.7.2".
I have installed "babel-plugin-transform-decorators-legacy": "^1.3.4",
I've tried to use the stage-x presets only to get Decorators are not supported yet in 6.x pending proposal update.
Has anyone still been having trouble with transform-decarators-legacy post update?
babel-plugin-transform-decorators-legacypackage? - zakangelle