1
0
mirror of https://github.com/flarum/core.git synced 2025-07-28 04:00:40 +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 7d48c24dda
commit d189272473
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');