Created
November 17, 2017 18:56
-
-
Save jungomi/7125cf2ede227a44554ac9559aa00f7b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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