fix(build): fix path error when appConfig has no main #3867

Merged
merged 1 commit into from Jan 11, 2017

Projects

Done in Tracking

3 participants

@filipesilva
Member

Fixes a path error when main is missing in angular-cli.json:

kamik@T460p MINGW64 /D/sandbox/master-proj
$ ng build

Path must be a string. Received undefined
TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.resolve (path.js:184:7)
# ...
@googlebot googlebot added the cla: yes label Jan 5, 2017
@hansl
Collaborator
hansl commented Jan 6, 2017

From what I understand this also allows people to use the CLI for apps that have no main at all, correct?

@filipesilva
Member

@hansl yes, it will simply compile scripts and styles if there is no main. Was planning on using it to test the Angular ES5 examples on docs.

tests/e2e/tests/misc/minimal-config.ts
+ scripts: ['./script.js']
+ }]
+ }),
+ }))
.then(() => ng('build'));
@hansl
hansl Jan 10, 2017 Collaborator

Could you verify that console.log('hello') is in the output? Alternatively, does ng serve still work? I'd rather test that.

@filipesilva filipesilva fix(build): fix path error when appConfig has no main
d07dbcb
@hansl
Collaborator
hansl commented Jan 11, 2017

LGTM.

@hansl
hansl approved these changes Jan 11, 2017 View changes
@filipesilva filipesilva merged commit 7bd165b into angular:master Jan 11, 2017

3 checks passed

cla/google All necessary CLAs are signed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@filipesilva filipesilva deleted the filipesilva:no-main-no-fail branch Jan 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment