-
-
Notifications
You must be signed in to change notification settings - Fork 433
Closed
Labels
Description
Expected Behaviour
I would like to have two different ts config files.
Actual Behaviour
I have a project with two somehow separate folders:
- The APP using React
- The SDK using Preact
I should probably create distinct repositories, but I thought that it makes my life easier for now, because the APP will be my first POC for the SDK. The SDK shows only little bit of HTML and uses Preact because of the small size, but I cannot get them to work in one webpack config.
I have two different entry points and tried to use two rules. But my understanding from the Readme is that it should not be needed:
config.entry = {
'app': './src/app/index.tsx',
'sdk': './src/sdk/index.tsx',
};
config.module.rules.push({
test: /\.ts[x]?$/,
use: [{
loader: 'ts-loader',
options: {
context: root('src', 'app'),
configFile: root('src', 'app', 'tsconfig.json')
}
}],
include: root('src', 'app')
});
config.module.rules.push({
test: /\.ts[x]?$/,
use: [{
loader: 'ts-loader',
options: {
context: root('src', 'sdk'),
configFile: root('src', 'sdk', 'tsconfig.json')
}
}],
include: root('src', 'sdk')
});
Steps to Reproduce the Problem
I have created a minimum repository to reproduce the problem. It contains a little bit of extra packages which I have no removed.
freiondrej and JeremyTCD