1
0
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:
David Wheatley
2021-05-13 00:28:17 +01:00
committed by GitHub
parent 5f2978d81f
commit 9b21d05207
6 changed files with 291 additions and 267 deletions

View File

@ -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');