
I am working on Dynamics 365 project where individual pages require some code, and I will have multiple main files 1 per page. Each of these will import exported generic classes and I want all the imports including the main file to be compiled into 1 file, without requires or any other fuss.
For example main file 1 is defined:
import {genericClass1} from './blah/genericClass1';
class Class1 {
static Method1() {
//code
genericClass1.genericMethod1();
}
}
For example main file 2 is defined:
import {genericClass1} from './blah/genericClass1';
class class2 {
static Method1() {
//code
genericClass1.genericMethod1();
}
}
GenericClass1 defined as follows
export class GenericClass1 {
static genericMethod1() {
//code
}
}
I want the compiler to spit out, 2 files. 1 for Class, another one Class2 with genericClass definition included in both files. Without any kind of requires includes etc, just plain vanilla browser readable code.
I tired multiple settings for tsc, installed webpack as well nothing seems to be able to help with this.