Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ jobs:
- custom_attach_workspace
- run: yarn webdriver-update
- run: yarn test-large --full --flakey
- run: yarn test-large --full --flakey --ve=true
- run: yarn test-large --full --flakey --ve

build-bazel:
executor: action-executor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ import {

describe('Browser Builder rebuilds', () => {
const target = { project: 'app', target: 'build' };
// Rebuild tests are especially sensitive to time between writes due to file watcher
// behaviour. Give them a while.
const rebuildDebounceTime = 3000;
let architect: Architect;

beforeEach(async () => {
Expand Down Expand Up @@ -77,7 +80,7 @@ describe('Browser Builder rebuilds', () => {
const run = await architect.scheduleTarget(target, overrides);
await run.output
.pipe(
debounceTime(1000),
debounceTime(rebuildDebounceTime),
tap(result => {
expect(result.success).toBe(true, 'build should succeed');
const hasLazyChunk = host.scopedSync().exists(normalize('dist/lazy-lazy-module.js'));
Expand Down Expand Up @@ -128,7 +131,7 @@ describe('Browser Builder rebuilds', () => {
const run = await architect.scheduleTarget(target, overrides);
await run.output
.pipe(
debounceTime(1000),
debounceTime(rebuildDebounceTime),
tap(buildEvent => expect(buildEvent.success).toBe(true)),
tap(() => host.appendToFile('src/app/app.component.css', ':host { color: blue; }')),
take(2),
Expand Down Expand Up @@ -158,7 +161,7 @@ describe('Browser Builder rebuilds', () => {
const run = await architect.scheduleTarget(target, overrides, { logger });
await run.output
.pipe(
debounceTime(1000),
debounceTime(rebuildDebounceTime),
tap(buildEvent => {
buildNumber += 1;
switch (buildNumber) {
Expand Down Expand Up @@ -211,7 +214,7 @@ describe('Browser Builder rebuilds', () => {
const run = await architect.scheduleTarget(target, overrides);
await run.output
.pipe(
debounceTime(1000),
debounceTime(rebuildDebounceTime),
tap(buildEvent => expect(buildEvent.success).toBe(true)),
tap(() => host.writeMultipleFiles({ 'src/type.ts': `export type MyType = string;` })),
take(2),
Expand All @@ -234,7 +237,7 @@ describe('Browser Builder rebuilds', () => {
const run = await architect.scheduleTarget(target, overrides, { logger });
await run.output
.pipe(
debounceTime(1000),
debounceTime(rebuildDebounceTime),
tap(buildEvent => {
buildNumber++;
switch (buildNumber) {
Expand Down Expand Up @@ -291,7 +294,7 @@ describe('Browser Builder rebuilds', () => {
const run = await architect.scheduleTarget(target, overrides, { logger });
await run.output
.pipe(
debounceTime(1000),
debounceTime(rebuildDebounceTime),
tap(buildEvent => {
buildNumber += 1;
switch (buildNumber) {
Expand Down Expand Up @@ -365,7 +368,7 @@ describe('Browser Builder rebuilds', () => {
const run = await architect.scheduleTarget(target, overrides);
await run.output
.pipe(
debounceTime(1000),
debounceTime(rebuildDebounceTime),
tap(buildEvent => {
buildNumber += 1;
const fileName = './dist/main.js';
Expand Down Expand Up @@ -455,7 +458,7 @@ describe('Browser Builder rebuilds', () => {
const run = await architect.scheduleTarget(target, overrides);
await run.output
.pipe(
debounceTime(1000),
debounceTime(rebuildDebounceTime),
tap(buildEvent => {
buildNumber += 1;
switch (buildNumber) {
Expand Down Expand Up @@ -486,7 +489,7 @@ describe('Browser Builder rebuilds', () => {
let buildCount = 1;
const run = await architect.scheduleTarget(target, overrides);
await run.output.pipe(
debounceTime(1000),
debounceTime(rebuildDebounceTime),
tap(() => {
const content = virtualFs.fileBufferToString(
host.scopedSync().read(join(outputPath, 'main.js')),
Expand Down Expand Up @@ -516,7 +519,7 @@ describe('Browser Builder rebuilds', () => {
let buildCount = 1;
const run = await architect.scheduleTarget(target, overrides);
await run.output.pipe(
debounceTime(1000),
debounceTime(rebuildDebounceTime),
tap(() => {
const content = virtualFs.fileBufferToString(
host.scopedSync().read(join(outputPath, 'main.js')),
Expand Down
4 changes: 3 additions & 1 deletion packages/ngtools/webpack/src/angular_compiler_plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1258,8 +1258,10 @@ export class AngularCompilerPlugin {
if (!this._resourceLoader) {
return [];
}
// The source loader uses TS-style forward slash paths for all platforms.
const resolvedFileName = forwardSlashPath(fileName);

return this._resourceLoader.getResourceDependencies(fileName);
return this._resourceLoader.getResourceDependencies(resolvedFileName);
}

// This code mostly comes from `performCompilation` in `@angular/compiler-cli`.
Expand Down