require('./config/docs.config.html'); now returns object in GA rather than string like RC0
Thank you for reporting an issue or suggesting an enhancement. We appreciate your feedback - to help the team to understand your needs, please complete the below template to ensure we have the necessary details to assist you.
Category
- [ ] Question
- [ ] Typo
- [ X] Bug
- [ ] Enhancement / Suggestion
- [ ] Additional article idea
Expected or Desired Behavior
var gg = require('./config/docs.config.html'); should return the string of the contents.
Observed Behavior
RC0 require would return html files as string, in GA it now returns an object.
Steps to Reproduce
Use the above in an angularjs angular.ui.router example
$stateProvider .state('config', { template: require('./config/docs.config.html'), params: { displayMode: undefined }, controller: 'DocsConfigController', controllerAs: 'vm'
};
This code complied ok in RC0 now in GA it complains the require is an object rather than string.
var gg =
Will work, its mainly this behaviour wasn't captured in the release notes as far as I can see.
This is probably because we updated the webpack-env typings. Is this a Typescript issue or a runtime issue?
If it's a typescript issue, try saying var gg = require<string>('./config/docs.config.html');.
Yeah that works fine, it should probably get added to the release notes though. Save someone re-raising it as a bug in here.
@patmill - can you take care of documenting this?
Done. Thanks @weshackett
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues