|
|
@ -152,7 +152,7 @@ function createWebpackConfig(defines, output) { |
|
|
|
loader: 'babel-loader', |
|
|
|
loader: 'babel-loader', |
|
|
|
exclude: /src\/core\/(glyphlist|unicode)/, // babel is too slow
|
|
|
|
exclude: /src\/core\/(glyphlist|unicode)/, // babel is too slow
|
|
|
|
options: { |
|
|
|
options: { |
|
|
|
presets: pdfjsNext ? undefined : ['es2015'], |
|
|
|
presets: pdfjsNext ? undefined : ['env'], |
|
|
|
plugins: ['transform-es2015-modules-commonjs'], |
|
|
|
plugins: ['transform-es2015-modules-commonjs'], |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
@ -999,7 +999,7 @@ gulp.task('lib', ['buildnumber'], function () { |
|
|
|
content = preprocessor2.preprocessPDFJSCode(ctx, content); |
|
|
|
content = preprocessor2.preprocessPDFJSCode(ctx, content); |
|
|
|
content = babel.transform(content, { |
|
|
|
content = babel.transform(content, { |
|
|
|
sourceType: 'module', |
|
|
|
sourceType: 'module', |
|
|
|
presets: noPreset ? undefined : ['es2015'], |
|
|
|
presets: noPreset ? undefined : ['env'], |
|
|
|
plugins: [ |
|
|
|
plugins: [ |
|
|
|
'transform-es2015-modules-commonjs', |
|
|
|
'transform-es2015-modules-commonjs', |
|
|
|
babelPluginReplaceNonWebPackRequire, |
|
|
|
babelPluginReplaceNonWebPackRequire, |
|
|
@ -1043,7 +1043,7 @@ gulp.task('lib', ['buildnumber'], function () { |
|
|
|
'!web/compatibility.js', |
|
|
|
'!web/compatibility.js', |
|
|
|
], { base: '.', }), |
|
|
|
], { base: '.', }), |
|
|
|
gulp.src('test/unit/*.js', { base: '.', }), |
|
|
|
gulp.src('test/unit/*.js', { base: '.', }), |
|
|
|
]).pipe(transform(preprocess)) |
|
|
|
]).pipe(transform('utf8', preprocess)) |
|
|
|
.pipe(gulp.dest('build/lib/')); |
|
|
|
.pipe(gulp.dest('build/lib/')); |
|
|
|
return merge([ |
|
|
|
return merge([ |
|
|
|
buildLib, |
|
|
|
buildLib, |
|
|
@ -1316,7 +1316,7 @@ gulp.task('dist-pre', |
|
|
|
license: DIST_LICENSE, |
|
|
|
license: DIST_LICENSE, |
|
|
|
dependencies: { |
|
|
|
dependencies: { |
|
|
|
'node-ensure': '^0.0.0', // shim for node for require.ensure
|
|
|
|
'node-ensure': '^0.0.0', // shim for node for require.ensure
|
|
|
|
'worker-loader': '^0.8.0', // used in external/dist/webpack.json
|
|
|
|
'worker-loader': '^1.0.0', // used in external/dist/webpack.json
|
|
|
|
}, |
|
|
|
}, |
|
|
|
browser: { |
|
|
|
browser: { |
|
|
|
'fs': false, |
|
|
|
'fs': false, |
|
|
|