Skip to content

Commit 065e98f

Browse files
committed
fix(bundle): remove bundling.
1 parent b92b236 commit 065e98f

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

addon/ng2/blueprints/ng2/files/__path__/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"declaration": false,
55
"emitDecoratorMetadata": true,
66
"experimentalDecorators": true,
7+
"mapRoot": "/",
78
"module": "commonjs",
89
"moduleResolution": "node",
910
"noEmitOnError": true,

lib/broccoli/angular-broccoli-bundle.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,8 @@ class BundlePlugin extends Plugin {
1616
build() {
1717
var relativeRoot = path.relative(process.cwd(), this.inputPaths[0]);
1818
var builder = new Builder(relativeRoot, `${relativeRoot}/system-config.js`);
19-
return builder.bundle('main - [app/**/*]',
20-
`${this.outputPath}/main.js`, {
21-
minify: true
22-
})
23-
.then(() => builder.bundle('app - (app/**/*.js - [app/**/*.js])',
24-
`${this.outputPath}/app/index.js`, {
25-
minify: true
26-
}))
19+
20+
return builder.bundle('main', `${this.outputPath}/main.js`, { minify: true })
2721
.then(() => fse.copySync(`${this.inputPaths[0]}/system-config.js`,
2822
`${this.outputPath}/system-config.js`));
2923
}

tests/e2e/e2e_workflow.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ describe('Basic end-to-end Workflow', function () {
6666
// stuck to the first build done
6767
sh.exec(`${ngBin} build -prod`);
6868
expect(existsSync(path.join(process.cwd(), 'dist'))).to.be.equal(true);
69-
var appBundlePath = path.join(process.cwd(), 'dist', 'app', 'index.js');
70-
var appBundleContent = fs.readFileSync(appBundlePath, { encoding: 'utf8' });
69+
var mainBundlePath = path.join(process.cwd(), 'dist', 'main.js');
70+
var mainBundleContent = fs.readFileSync(mainBundlePath, { encoding: 'utf8' });
7171
// production: true minimized turns into production:!0
72-
expect(appBundleContent).to.include('production:!0');
72+
expect(mainBundleContent).to.include('production:!0');
7373
// Also does not create new things in GIT.
7474
expect(sh.exec('git status --porcelain').output).to.be.equal(undefined);
7575
});
@@ -415,7 +415,7 @@ describe('Basic end-to-end Workflow', function () {
415415
expect('build failed where it should have succeeded').to.equal('');
416416
});
417417
});
418-
418+
419419
it('Serve and run e2e tests after all other commands', function () {
420420
this.timeout(240000);
421421

0 commit comments

Comments
 (0)