1
0
mirror of https://github.com/flarum/core.git synced 2025-08-06 16:36:47 +02:00

Add Webpack Bundle Analyzer to webpack config (#12)

This commit is contained in:
David Wheatley
2021-05-13 00:05:27 +01:00
committed by GitHub
parent 30a95910bb
commit abea6716eb
4 changed files with 147 additions and 3 deletions

View File

@@ -14,6 +14,18 @@ module.exports = config(options);
To merge in custom Webpack config options, use [webpack-merge](https://www.npmjs.com/package/webpack-merge).
### Webpack Bundle Analyzer
You can view a visual representation of your JS Bundle by building with Webpack Bundle Analyzer.
Add another build script to your `package.json` like the one below:
```json
{
"analyze": "npx cross-env ANALYZER=true npm run build"
}
```
## Typescript
You'll need to configure a `tsconfig.json` file to ensure your IDE sets up Typescript support correctly.