1
0
mirror of https://github.com/flarum/core.git synced 2025-07-15 13:56:23 +02:00

Initial TypeScript infrastructure (#2206)

This allows us to get started with converting all Flarum JavaScript code to TypeScript.
In addition, we will have time to experiment to find the best Webpack configuration before integrating into flarum-webpack-config.

See flarum/flarum-webpack-config#3.
This commit is contained in:
David Sevilla Martín
2020-07-03 08:47:44 -04:00
committed by GitHub
parent 460aa9c910
commit 9f15631883
3 changed files with 198 additions and 0 deletions

View File

@ -5,4 +5,12 @@ module.exports = merge(config(), {
output: {
library: 'flarum.core'
},
// temporary TS configuration
resolve: {
extensions: ['.ts', '.tsx', '.js', '.json'],
},
});
module.exports['module'].rules[0].test = /\.(tsx?|js)$/;
module.exports['module'].rules[0].use.options.presets.push('@babel/preset-typescript');