feat: use TypeScript in the client (#42124)
This commit is contained in:
committed by
GitHub
parent
e190dd610a
commit
66dae77fc5
@ -37,8 +37,8 @@ module.exports = (env = {}) => {
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.jsx?$/,
|
||||
include: [path.join(__dirname, 'src/client/')],
|
||||
test: /\.(js|ts)$/,
|
||||
exclude: /node_modules/,
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
@ -47,7 +47,8 @@ module.exports = (env = {}) => {
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{ modules: false, targets: '> 0.25%, not dead' }
|
||||
]
|
||||
],
|
||||
'@babel/preset-typescript'
|
||||
],
|
||||
plugins: [
|
||||
'@babel/plugin-transform-runtime',
|
||||
@ -75,7 +76,8 @@ module.exports = (env = {}) => {
|
||||
util: false,
|
||||
stream: false,
|
||||
process: require.resolve('process/browser')
|
||||
}
|
||||
},
|
||||
extensions: ['.js', '.ts']
|
||||
}
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user