1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Remove strict-mode from the eval-script. (#520)

* Remove strict-mode from the eval-script.

* Use exact version for babel-plugin-transform-remove-strict-mode

* Use babelrc=false
This commit is contained in:
Arunoda Susiripala 2016-12-26 08:59:53 +05:30 committed by Naoyuki Kanezawa
parent 499a4f111a
commit 157d9aebf7
2 changed files with 13 additions and 1 deletions

View file

@ -15,7 +15,8 @@ gulp.task('compile', [
'compile-bin',
'compile-lib',
'compile-server',
'compile-client'
'compile-client',
'remove-strict-mode'
])
gulp.task('compile-bin', () => {
@ -50,6 +51,16 @@ gulp.task('compile-client', () => {
.pipe(notify('Compiled client files'))
})
gulp.task('remove-strict-mode', ['compile-lib'], () => {
return gulp.src('dist/lib/eval-script.js')
.pipe(babel({
babelrc: false,
plugins: ['babel-plugin-transform-remove-strict-mode']
}))
.pipe(gulp.dest('dist/lib'))
.pipe(notify('Completed removing strict mode for eval script'))
})
gulp.task('copy', ['copy-pages'])
gulp.task('copy-pages', () => {

View file

@ -79,6 +79,7 @@
},
"devDependencies": {
"babel-eslint": "7.1.1",
"babel-plugin-transform-remove-strict-mode": "0.0.2",
"babel-preset-env": "1.1.4",
"benchmark": "2.1.3",
"coveralls": "2.11.15",