mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 07:38:01 +08:00
d189272473
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.
17 lines
419 B
JavaScript
Executable File
17 lines
419 B
JavaScript
Executable File
const config = require('flarum-webpack-config');
|
|
const merge = require('webpack-merge');
|
|
|
|
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');
|