https://github.com/flarum/flarum-webpack-config
[READ ONLY] Subtree split of Webpack config for Flarum JavaScript compilation.
https://github.com/flarum/flarum-webpack-config
Last synced: about 2 months ago
JSON representation
[READ ONLY] Subtree split of Webpack config for Flarum JavaScript compilation.
- Host: GitHub
- URL: https://github.com/flarum/flarum-webpack-config
- Owner: flarum
- License: mit
- Created: 2018-02-24T05:32:53.000Z (over 7 years ago)
- Default Branch: 2.x
- Last Pushed: 2025-01-17T08:56:24.000Z (5 months ago)
- Last Synced: 2025-04-11T09:12:07.951Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 1.21 MB
- Stars: 3
- Watchers: 9
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Webpack config for Flarum JS/TS compilation
This package generates a [Webpack](https://webpack.js.org) config object that will compile JavaScript for use in Flarum.
## Usage
**webpack.config.js**
```js
var config = require('flarum-webpack-config');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.
For details about this, see the [`flarum/flarum-tsconfig` repository](https://github.com/flarum/flarum-tsconfig)