mirror of
https://github.com/flarum/framework.git
synced 2024-11-22 11:16:39 +08:00
a6cc7d3742
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
---|---|---|
.. | ||
.gitignore | ||
index.js | ||
LICENSE | ||
package-lock.json | ||
package.json | ||
README.md |
Webpack config for Flarum JavaScript 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.
Options
useExtensions
Array<string>
, defaults to []
.
An array of extensions whose modules should be made available. This is a shortcut to add externals
configuration for extension modules. Imported extension modules will not be bundled, but will instead refer to the extension's exports included in the Flarum runtime (ie. flarum.extensions["vendor/package"]
).
For example, to access the Tags extension module within your extension:
forum.js
import { Tag } from '@flarum/tags/forum';
webpack.config.js
module.exports = config({
useExtensions: ['flarum/tags']
});