mirror of
https://github.com/flarum/core.git
synced 2025-07-15 13:56:23 +02:00
Update core to use new Webpack config, flarum-tsconfig
, and build action (#2856)
* Update core to use new Webpack and TSConfig * Bump webpack dep * Update JS build action * Copy custom `.d.ts` files to `dist-typings` folder on typings compile * Run workflow against action v2 This allows us to have a moving tag, like first party actions have. * Remove bundle analyzer from core * Use webpack config 0.1.0-beta.16.2 * Add note about checking flarum-tsconfig
This commit is contained in:
@ -1,27 +1,8 @@
|
||||
const config = require('flarum-webpack-config');
|
||||
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
||||
const merge = require('webpack-merge');
|
||||
|
||||
const useBundleAnalyzer = process.env.ANALYZER === 'true';
|
||||
|
||||
const plugins = [];
|
||||
|
||||
if (useBundleAnalyzer) {
|
||||
plugins.push(new BundleAnalyzerPlugin());
|
||||
}
|
||||
|
||||
module.exports = merge(config(), {
|
||||
output: {
|
||||
library: 'flarum.core',
|
||||
},
|
||||
|
||||
// temporary TS configuration
|
||||
resolve: {
|
||||
extensions: ['.ts', '.tsx', '.js', '.json'],
|
||||
},
|
||||
|
||||
plugins,
|
||||
});
|
||||
|
||||
module.exports['module'].rules[0].test = /\.(tsx?|js)$/;
|
||||
module.exports['module'].rules[0].use.options.presets.push('@babel/preset-typescript');
|
||||
|
Reference in New Issue
Block a user