Skip to content

Commit

Permalink
support for tsx files
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexBeesley committed Dec 25, 2023
1 parent b48a99b commit 498f1b8
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions webpack/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
const { merge } = require('webpack-merge')
const commonConfig = require('./webpack.common.js')
const { merge } = require('webpack-merge');
const commonConfig = require('./webpack.common.js');

module.exports = (envVars) => {
const { env } = envVars
const envConfig = require(`./webpack.${env}.js`)
const config = merge(commonConfig, envConfig)
return config
}
const { env } = envVars;
const envConfig = require(`./webpack.${env}.js`);
const config = merge(commonConfig, envConfig);

config.module.rules.push({
test: /\.tsx?$/,
exclude: /node_modules/,
use: 'ts-loader',
});

config.resolve.extensions.push('.ts', '.tsx');

return config;
};

0 comments on commit 498f1b8

Please sign in to comment.