File tree Expand file tree Collapse file tree 7 files changed +19
-21
lines changed
Expand file tree Collapse file tree 7 files changed +19
-21
lines changed Original file line number Diff line number Diff line change @@ -426,7 +426,7 @@ npm start angular-five typescript-plain
426426Note that when running all example projects concurrently, you may need to increase
427427Node's memory limit:
428428```
429- NODE_OPTIONS="--max-old-space-size= 8192" npm start
429+ NODE_OPTIONS="--max-old-space-size 8192" npm start
430430```
431431
432432Examples will be available at ` http://HOST:PORT/examples/EXAMPLE_NAME ` .
Original file line number Diff line number Diff line change 1515 " es6" ,
1616 " es7"
1717 ],
18- "version" : " 2.3.1 " ,
18+ "version" : " 2.3.3-next.3 " ,
1919 "author" : {
2020 "name" : " Daniel Schaffer" ,
21216969 "@babel/preset-env" : " ^7.3.1" ,
7070 "@babel/runtime" : " ^7.3.1" ,
7171 "babel-loader" : " ^8.0.5" ,
72- "core-js" : " ^3.2.1 " ,
72+ "core-js" : " ^2.6.3 " ,
7373 "tapable" : " ^1.1.1" ,
7474 "webpack-merge" : " ^4.2.1" ,
7575 "webpack-sources" : " ^1.3.0"
Original file line number Diff line number Diff line change @@ -2,12 +2,10 @@ import { BabelPresetOptions } from 'babel-loader'
22
33import { StandardTargetOptionsMap } from './babel.target.options'
44
5- export const DEFAULT_COREJS_VERSION = 3
6-
75export const DEFAULT_BABEL_PRESET_OPTIONS : BabelPresetOptions = {
86 modules : false ,
97 useBuiltIns : 'usage' ,
10- corejs : DEFAULT_COREJS_VERSION ,
8+ corejs : 2 ,
119}
1210
1311export const DEFAULT_BABEL_PLUGINS : string [ ] = [
Original file line number Diff line number Diff line change @@ -361,6 +361,11 @@ export class TargetingPlugin implements Plugin {
361361 return true
362362 }
363363
364+ if ( resolveContext . mode === 'sync' && ! resolveContext . resourceResolveData ) {
365+ // Webpack require.context modules
366+ return true
367+ }
368+
364369 const pkgRoot = resolveContext . resourceResolveData . descriptionFileRoot
365370 const pkg = resolveContext . resourceResolveData . descriptionFileData
366371
@@ -382,7 +387,14 @@ export class TargetingPlugin implements Plugin {
382387 return false
383388 }
384389 if ( typeof ( pkg . browser === 'object' ) &&
385- Object . values ( pkg . browser ) . find ( ( entry : string ) => resolveContext . resource === path . resolve ( pkgRoot , entry ) )
390+ Object . values ( pkg . browser ) . find ( ( entry : string | boolean ) => {
391+ if ( typeof entry === 'string' ) {
392+ return resolveContext . resource === path . resolve ( pkgRoot , entry )
393+ }
394+ // "browser" object values can be `false` when packages want the browser to ignore a module
395+ // see https://github.com/defunctzombie/package-browser-field-spec#ignore-a-module
396+ return false
397+ } )
386398 ) {
387399 return false
388400 }
Original file line number Diff line number Diff line change 11declare module 'babel-loader' {
22 import { TransformOptions } from 'babel-core'
33
4- // eslint-disable-next-line no-magic-numbers
5- type CoreJsVersion = 2 | 3
6-
74 export interface BabelPresetOptions {
8- corejs ?: CoreJsVersion | {
9- version : CoreJsVersion
10- proposals ?: boolean
11- shippedProposals ?: boolean
12- }
135 spec ?: boolean ;
146 loose ?: boolean ;
157 modules ?: 'amd' | 'umd' | 'systemjs' | 'commonjs' | false ;
168 debug ?: boolean ;
179 include ?: Array < string > ;
1810 exclude ?: Array < string > ;
1911 useBuiltIns ?: 'usage' | 'entry' | false ;
12+ corejs ?: 2 | 3 ;
2013 forceAllTransforms ?: boolean ;
2114 configPath ?: string ;
2215 ignoreBrowserslistConfig ?: boolean ;
Original file line number Diff line number Diff line change @@ -2319,16 +2319,11 @@ core-js-compat@^3.1.1:
23192319 browserslist "^4.6.6"
23202320 semver "^6.3.0"
23212321
2322- core-js@^2.4.0 :
2322+ core-js@^2.4.0, core-js@^2.6.3 :
23232323 version "2.6.9"
23242324 resolved "https://registry.npmjs.org/core-js/-/core-js-2.6.9.tgz#6b4b214620c834152e179323727fc19741b084f2"
23252325 integrity sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A==
23262326
2327- core-js@^3.2.1 :
2328- version "3.2.1"
2329- resolved "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz#cd41f38534da6cc59f7db050fe67307de9868b09"
2330- integrity sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==
2331-
23322327[email protected] , core-util-is@~1.0.0:
23332328 version "1.0.2"
23342329 resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
You can’t perform that action at this time.
0 commit comments