Florian Bouillon 8b12c56fe7 Moved types to the module folder
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
2021-03-15 17:23:04 +01:00

38 lines
755 B
JavaScript

module.exports = {
webpackFinal: async (baseConfig, options) => {
const { module = {} } = baseConfig;
const newConfig = {
...baseConfig,
module: {
...module,
rules: [...(module.rules || [])],
},
};
// TypeScript
newConfig.module.rules.push({
test: /\.(ts|tsx)$/,
// include: [path.resolve(__dirname, '../src/client/components')],
use: ['babel-loader', 'ts-loader']
});
newConfig.resolve.extensions.push('.ts', '.tsx');
// Stylus
newConfig.module.rules.push({
test: /\.styl$/,
use: ['style-loader', {
loader: 'css-loader',
options: {
url: false,
importLoaders: 1,
modules: true
},
}, 'stylus-loader'],
});
newConfig.resolve.extensions.push('.styl');
return newConfig;
},
};