-
Notifications
You must be signed in to change notification settings - Fork 914
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve typescript imports #220
Comments
Are you using VS code ? I guess application will work if you run |
Yes, I use VS code. I have tested a multiple solutions like restart app, disable plugins .. Have a good weekend. |
Hi @mm185 ! Thank you for taking time to try to solve this problem. As you found out, it is in fact problem with the editors. The original version of the paths in Cheers! |
Hey @tomastrajan. I agree, looks like there is a bug in the typescript implementation those editors use. Do you maybe know editors with typescript support that don't cause this error? Only other resolution I can think of would be to use only absolute paths in imports. |
Hi @mm185 ! {
"compileOnSave": false,
"compilerOptions": {
// can't use es6.
// see the followings issues :
// https://github.com/angular/material2/issues/11090
// https://github.com/angular/material2/issues/10567
"target": "es5",
"baseUrl": ".",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"noImplicitAny": true,
"noUnusedLocals": true,
"jsx": "preserve",
"typeRoots": ["node_modules/@types"],
"lib": ["es2017", "dom"],
"plugins": [
{
"name": "tslint-language-service",
// see the notice here: https://github.com/angelozerr/tslint-language-service#tslint-language-service
// on Windows, this might trigger issues and should be removed
// and the issue here: https://github.com/Microsoft/TypeScript/issues/15344
"disableNoUnusedVariableRule": false
}
],
"paths": {
// temporary fix https://github.com/Stuk/jszip/issues/524
"stream": ["../node_modules/readable-stream/readable.js"],
"@env/*": ["environments/*"],
"@mks/*": ["mocks/*"],
"@feat/*": ["app/features/*"],
"@shared/*": ["app/shared/*"],
"@cock/*": ["app/features/cockpit/*"],
"@wks/*": ["app/features/cockpit/workspaces/*"]
}
},
"include": ["src/**/*"],
"angularCompilerOptions": {
"preserveWhitespaces": false
}
} tsconfig.app.json : {
"extends": "../tsconfig.json",
"compilerOptions": {
"baseUrl": "",
"outDir": "../out-tsc/app",
"module": "es2015",
"types": ["node"]
},
"angularCompilerOptions": {
"preserveWhitespaces": false
},
"exclude": ["test.ts", "testing/**", "**/*.spec.ts"]
} angular.json : {
"$schema":
"./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json",
"version": 1,
"newProjectRoot": "src",
"projects": {
"petals-cockpit": {
"root": "",
"sourceRoot": "/src",
"prefix": "app",
"projectType": "application",
"architect": {
"build": { ... Can't use relative path too in the rooting module file like : loadChildren:
'./services-endpoint-view.module#ServicesEndpointViewModule', current routing module : ...
const routes: Routes = [
{
path: '',
pathMatch: 'full',
redirectTo: 'services',
},
{
path: 'endpoints/:endpointId',
loadChildren:
'@wks/services-content/services-endpoint-view/services-endpoint-view.module#ServicesEndpointViewModule',
},
];
... I agree too, looks like there is a bug in the typescript implementation those editors use. |
I was able to solve this by changing the
Found solution on this thread: angular/angular-cli#8138 |
@adityash5 thank you very much for your contribution! I am just pushing the fix to the master branch. |
Hi guys ! Last month, I used this configuration :
and this has worked well since this change. |
Hi @tomastrajan !
Doesn't work for me ... any solution ? Thanks
angular-ngrx-material-starter/src/app/app.module.ts
Lines 5 to 6 in 5e9106a
The text was updated successfully, but these errors were encountered: