mirror of
https://github.com/flarum/core.git
synced 2025-09-12 00:50:48 +02:00
.github
js
dist
src
.prettierrc.json
admin.js
forum.js
package-lock.json
package.json
shims.d.ts
tsconfig.json
webpack.config.js
less
migrations
src
stubs
tests
views
.editorconfig
.gitattributes
.gitignore
.styleci.yml
CHANGELOG.md
LICENSE
README.md
composer.json
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');
|