framework/js-packages/webpack-config
Davide Iadeluca 333bbb11e2
fix(webpack): chunk module path checking fails with dotted directories (#4179)
Resolves issues when the path contains unexpected periods
2025-02-08 17:50:12 +01:00
..
src fix(webpack): chunk module path checking fails with dotted directories (#4179) 2025-02-08 17:50:12 +01:00
tests feat: export registry (#3842) 2023-06-29 18:57:53 +01:00
.gitignore feat: add support for Plug'n'Play package managers (#14) 2021-11-08 23:53:18 +00:00
.prettierrc.json Fix Flarum on iOS 10 and below (#9) 2021-05-04 00:39:10 +01:00
babel.config.cjs feat: export registry (#3842) 2023-06-29 18:57:53 +01:00
LICENSE feat: messages extension (#4028) 2024-09-28 11:12:52 +01:00
package.json chore: flarum-webpack-config 3.0.1 2025-01-10 16:55:00 +01:00
README.md feat: export registry (#3842) 2023-06-29 18:57:53 +01:00

Webpack config for Flarum JS/TS compilation

This package generates a Webpack config object that will compile JavaScript for use in Flarum.

Usage

webpack.config.js

var config = require('flarum-webpack-config');

module.exports = config(options);

To merge in custom Webpack config options, use 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:

{
  "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.

For details about this, see the flarum/flarum-tsconfig repository