Skip to content

Commit abd35e3

Browse files
Merge branch 'release/2.3.3'
2 parents fd3dc27 + 9ddda59 commit abd35e3

File tree

7 files changed

+19
-21
lines changed

7 files changed

+19
-21
lines changed
-145 KB
Binary file not shown.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ npm start angular-five typescript-plain
426426
Note that when running all example projects concurrently, you may need to increase
427427
Node'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

432432
Examples will be available at `http://HOST:PORT/examples/EXAMPLE_NAME`.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"es6",
1616
"es7"
1717
],
18-
"version": "2.3.1",
18+
"version": "2.3.3-next.3",
1919
"author": {
2020
"name": "Daniel Schaffer",
2121
"email": "[email protected]",
@@ -69,7 +69,7 @@
6969
"@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"

src/defaults.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ import { BabelPresetOptions } from 'babel-loader'
22

33
import { StandardTargetOptionsMap } from './babel.target.options'
44

5-
export const DEFAULT_COREJS_VERSION = 3
6-
75
export const DEFAULT_BABEL_PRESET_OPTIONS: BabelPresetOptions = {
86
modules: false,
97
useBuiltIns: 'usage',
10-
corejs: DEFAULT_COREJS_VERSION,
8+
corejs: 2,
119
}
1210

1311
export const DEFAULT_BABEL_PLUGINS: string[] = [

src/targeting.plugin.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff 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
}

src/types/babel-loader.d.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
11
declare 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;

yarn.lock

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff 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"

0 commit comments

Comments
 (0)