You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
create some typescript file (test.ts) and require it using worker-loader, for example in app.component.ts:
let Worker = require('worker-loader!./test.ts');
and try to create it in constructor:
constructor() {
const worker = new Worker();
}
The log given by the failure.
Uncaught Error: Module build failed: TypeError: Cannot read property 'newLine' of undefined
at Object.getNewLineCharacter (E:\project\upd\node_modules\typescript\lib\typescript.js:8062:20)
at Object.createCompilerHost (E:\project\upd\node_modules\typescript\lib\typescript.js:44978:26)
at Object.ngcLoader (E:\project\upd\node_modules@ngtools\webpack\src\loader.js:350:33)
Mention any other details that might be useful.
Worked before cli switched to own ts loader, works fine when override loaders in require with own ts-loader like "require('!!worker-loader!ts-loader!./test.ts')" until required file has some imports which is loaded using cli loader again, probably any way to override inner requires globally on worker-loader require ?
What's expected solution to load worker files using cli ?
Activity
filipesilva commentedon Feb 17, 2017
Using loaders explicitly is not a supported usecase for the CLI and we provide no guarantee it will work.
angular-automatic-lock-bot commentedon Sep 6, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.