Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
"author": "cramforce",
"license": "Apache-2.0",
"devDependencies": {
"@angular/common": "^2.4.7",
"@angular/core": "^2.4.7",
"@angular/platform-browser": "github:angular/platform-browser-builds#master-es2015",
"babel-plugin-transform-object-rest-spread": "^6.20.2",
"babel-preset-es2015": "^6.18.0",
"babel-preset-stage-0": "^6.16.0",
Expand All @@ -33,7 +36,9 @@
"promise-pjs": "^1.1.2",
"react": "^15.4.1",
"react-dom": "^15.4.1",
"tap": "^8.0.0"
"rxjs": "^5.1.1",
"tap": "^8.0.0",
"zone.js": "^0.7.7"
},
"dependencies": {
"babel-plugin-transform-es2015-modules-commonjs": "^6.18.0",
Expand Down
12 changes: 11 additions & 1 deletion splittable.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,13 @@ exports.getGraph = function(entryModules, config) {
transform(babel, {
babelrc: false,
plugins: [
require.resolve("babel-plugin-transform-export-extensions"),
require.resolve("babel-plugin-transform-es2015-modules-commonjs"),
]
],
// Also transform node_modules. This should be safe, since we only
// do module discovery here.
ignore: false,
global: true,
});

b.on('package', function(pkg) {
Expand Down Expand Up @@ -291,6 +296,11 @@ exports.getGraph = function(entryModules, config) {
if (seenTransform[filename]) {
return; // We only care about the first transform per file.
}
if (filename.indexOf('node_modules/') != -1) {
// The only once hack doesn't work with node_modules because
// the primary transform is not global.
return;
}
seenTransform[filename] = true;
filename = relativePath(process.cwd(), filename);
// Copy transformed code into shadow path. Files in this path
Expand Down
1 change: 1 addition & 0 deletions test/module-regression/angular.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import { platformBrowser } from '@angular/platform-browser/index';
Binary file modified third_party/closure-compiler/closure-compiler-1.0-SNAPSHOT.jar
Binary file not shown.