I found out!! Not sure how to fully solve it yet to use all updated packages.
Looking through my last project, which I've had used the scrambleTextPlugin successfully I was using the Babel core interpreter at version 6x.
In this new project, I've used Babel 7x, which changes the way the plugins are loaded. Nevertheless, I was using the same plugins as the old working project, but importing in a new way.
* WORKING CONFIG:
"babel-core": "^6.26.3",
"babel-eslint": "^8.2.6",
"babel-plugin-dynamic-import-node": "^1.2.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.7.0",
"babel-runtime": "^6.26.0",
"babelify": "^8.0.0",
"browserify": "^16.2.2",
"gsap": "^2.0.2",
"gulp": "^4.0.0",
"gulp-babel": "^7.0.1",
"gulp-browserify": "^0.5.1",
"gulp-cache": "^1.0.2",
"gulp-cond": "^1.0.0",
"gulp-envify": "^1.0.0",
"gulp-eslint": "^4.0.2",
"gulp-image-resize": "^0.13.0",
"gulp-imagemin": "^4.1.0",
"gulp-jsdoc3": "^2.0.0",
"gulp-plumber": "^1.2.0",
"gulp-postcss": "^7.0.1",
"gulp-rename": "^1.4.0",
"gulp-sass": "^4.0.1",
"gulp-sourcemaps": "^2.6.4",
"gulp-uglify": "^3.0.1",
"gulp-watch": "^5.0.1",
* NOT WORKING CONFIG:
"@babel/core": "^7.0.0",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"babel-eslint": "^9.0.0",
"babel-plugin-dynamic-import-node": "^2.1.0",
"babel-plugin-transform-es2015-spread": "^6.22.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.7.0",
"babel-runtime": "^6.26.0",
"babelify": "^10.0.0",
"browserify": "^16.2.2",
"gsap": "^2.0.2",
"gulp": "^4.0.0",
"gulp-babel": "^8.0.0",
"gulp-browserify": "^0.5.1",
"gulp-cache": "^1.0.2",
"gulp-cond": "^1.0.0",
"gulp-envify": "^1.0.0",
"gulp-eslint": "^5.0.0",
"gulp-image-resize": "^0.13.0",
"gulp-imagemin": "^4.1.0",
"gulp-jsdoc3": "^2.0.0",
"gulp-plumber": "^1.2.0",
"gulp-postcss": "^8.0.0",
"gulp-rename": "^1.4.0",
"gulp-sass": "^4.0.1",
"gulp-sourcemaps": "^2.6.4",
"gulp-uglify": "^3.0.1",
"gulp-watch": "^5.0.1",
Hope it can help someone. I will keep trying to make it work with the newer version of Babel and update the post if successful
UPDATE:
Got it! Found a config which worked well, meaning that I'm using latest Babel lib and plugins along with Greensock within my Bundler strategy.
# Package.json
"@babel/core": "^7.1.2",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.1.0",
"@babel/plugin-transform-spread": "^7.0.0",
"babel-eslint": "^9.0.0",
"babel-plugin-dynamic-import-node": "^2.1.0",
"babel-preset-env": "^1.7.0",
"babel-preset-es2015": "^6.24.1",
"babelify": "^10.0.0",
"browserify": "^16.2.2",
# .babelrc
{
"presets": ["env"],
"plugins": ["@babel/plugin-proposal-object-rest-spread", "@babel/plugin-transform-spread", "@babel/plugin-transform-runtime", "dynamic-import-node"]
}
# gulp file (added the es2015 preset)
browserify({
"entries": modulePath + "/js/main.js",
"noParse": ["vue.js"],
"plugin": argv.w || argv.watch ? [watchify] : [],
"cache": {},
"packageCache": {},
"debug": !isProd
}).transform("envify", {
"global": true,
"NODE_ENV": process.env.NODE_ENV,
"transform": [["babelify", { "presets": ["es2015"] }]]
})
Thanks for the support people, very glad it is working now