Skip to content

Commit 40c33c8

Browse files
committed
feat(module): reproducible example of styles import issue
1 parent 20bef52 commit 40c33c8

File tree

5 files changed

+21
-2
lines changed

5 files changed

+21
-2
lines changed

src/core/module/file.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export class SomeClass {
2+
3+
static foo() {
4+
console.log('bar');
5+
}
6+
}

src/core/module/styles.scss

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
body {
2+
background: red;
3+
}

src/main.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
import { enableProdMode } from '@angular/core';
22
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3-
43
import { AppModule } from './app/app.module';
54
import { environment } from './environments/environment';
65

6+
import { SomeClass } from '@core/module/file'; // aliased import works fine with TS files
7+
78
if (environment.production) {
89
enableProdMode();
910
}
1011

1112
platformBrowserDynamic().bootstrapModule(AppModule)
1213
.catch(err => console.log(err));
14+
15+
16+
SomeClass.foo(); // this seems to work file

src/styles.scss

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/* You can add global styles to this file, and also import other style files */
2+
@import '~@core/module/styles'; // this fails since 1.3.0

src/tsconfig.app.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
"outDir": "../out-tsc/app",
55
"baseUrl": "./",
66
"module": "es2015",
7-
"types": []
7+
"types": [],
8+
"paths": {
9+
"@core/*": [
10+
"./core/*"
11+
]
12+
}
813
},
914
"exclude": [
1015
"test.ts",

0 commit comments

Comments
 (0)