Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed Feb 26, 2020
1 parent e99b959 commit ac16275
Show file tree
Hide file tree
Showing 4 changed files with 461 additions and 27 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"mocha": "^6.1.3",
"mocha-junit-reporter": "^1.21.0",
"mocha-multi-reporters": "^1.1.7",
"nyc": "^15.0.0",
"prettier": "1.19.1",
"rimraf": "^2.6.3",
"sinon": "^7.3.1"
Expand Down
1 change: 0 additions & 1 deletion packages/core/integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"lodash": "^4.17.15",
"marked": "^0.6.1",
"ncp": "^2.0.0",
"nyc": "^11.1.0",
"parcel": "^2.0.0-alpha.3.2",
"parcel-bundler": "^2.0.0-alpha.3.1",
"postcss-custom-properties": "^8.0.9",
Expand Down
24 changes: 8 additions & 16 deletions packages/shared/scope-hoisting/src/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -465,24 +465,16 @@ export function link({
} else {
// TODO
if (!mod) {
if (dep.isOptional) {
path.replaceWith(
THROW_TEMPLATE({MODULE: t.stringLiteral(source.value)}),
);
} else if (dep.isWeak && dep.isDeferred) {
let name = addExternalModule(path, dep);
if (!name) {
path.remove();
} else {
let name = addExternalModule(path, dep);
if (!name) {
path.remove();
} else {
path.replaceWith(
WILDCARD_TEMPLATE({
DEST: obj,
SRC: nullthrows(findSymbol(path, name)),
}),
);
}
path.replaceWith(
WILDCARD_TEMPLATE({
DEST: obj,
SRC: nullthrows(findSymbol(path, name)),
}),
);
}
} else {
path.replaceWith(
Expand Down
Loading

0 comments on commit ac16275

Please sign in to comment.