-
Notifications
You must be signed in to change notification settings - Fork 178
Conversation
actually, we can reproduce webpack2 behaviour
in config.js const config = {
use: [
{ loader: 'mycustom-loader', options: {} }
]
} So webpack resolves loaders relatively for webpack root. |
actually, easiest way to go: use: [
{
loader: 'awesome-typescript-loader',
options: {
customTranformersPath: require.resolve('./ts_transformers'),
}
}
] |
I would suggest to change required shape of a module being treated as custom transformers configuration. I have two considerations:
My proposal is the following:
export interface LoaderConfig {
optionsModule?: string;
}
export interface OptionsModule {
options?: {
getCustomTransformers?(): ts.CustomTransformers | undefined;
};
} it would allow such modules be extended in the future with something related to options as well as something unrelated. |
@Igorbek |
Oh, I'm not suggesting to replace configuration altogether with that. I'm saying that the module should be able to be widened in the purpose in the future. To not restrict ourselves to one single option. |
Since with
CheckerPlugin
checker starting in forked process, it's impossible to pass function as an argument.The solution could be to pass customTransformer as a module path.