Skip to content

Instantly share code, notes, and snippets.

@jungomi
Created November 17, 2017 18:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jungomi/7125cf2ede227a44554ac9559aa00f7b to your computer and use it in GitHub Desktop.
Save jungomi/7125cf2ede227a44554ac9559aa00f7b to your computer and use it in GitHub Desktop.
diff --git a/tasks/js.js b/tasks/js.js
index 0caabc1..7c5319d 100644
--- a/tasks/js.js
+++ b/tasks/js.js
@@ -70,7 +70,10 @@ gulp.task('js', () => {
name: 'app',
plugins: [
plugins.rollupPluginReplace({'process.env.NODE_ENV': JSON.stringify( 'development' )}),
- plugins.rollupPluginJsx({ factory: 'React.createElement' }),
+ plugins.rollupPluginBabel({
+ exclude: 'node_modules/**',
+ presets: [['es2015', { modules: false }], 'react']
+ }),
plugins.rollupPluginCommonjs({}),
plugins.rollupPluginNodeResolve({ jsnext: true, main: true }),
plugins.rollupPluginIncludepaths({ paths: [paths.dev + '/script/'] })
@@ -93,8 +96,6 @@ gulp.task('js', () => {
.pipe(plugins.vinylSourceStream('app.js', paths.dev + '/script/'))
.pipe(plugins.vinylBuffer())
.pipe(plugins.sourcemaps.init({ loadMaps: true }))
- // Convert ES6
- .pipe(plugins.babel({ presets: ['es2015', 'react'] }))
// Write sourcemap
.pipe(plugins.sourcemaps.write('.'))
.pipe(gulp.dest(paths.tmp + '/script/'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment