framework/js-packages/webpack-config
David Wheatley 8c2642b2f2 Fix Flarum on iOS 10 and below (#9)
* Ignore .vscode folder

* Add Prettier config

* Change author to 'Flarum Team'

* Bump deps to latest version

* Format with prettier; add `loose` where needed

* Don't exclude node modules from Babel processing
2021-05-04 00:39:10 +01:00
..
.gitignore Fix Flarum on iOS 10 and below (#9) 2021-05-04 00:39:10 +01:00
.prettierrc.json Fix Flarum on iOS 10 and below (#9) 2021-05-04 00:39:10 +01:00
index.js Fix Flarum on iOS 10 and below (#9) 2021-05-04 00:39:10 +01:00
LICENSE Update copyright claims in LICENSE 2019-11-30 00:34:03 +01:00
package-lock.json Fix Flarum on iOS 10 and below (#9) 2021-05-04 00:39:10 +01:00
package.json Fix Flarum on iOS 10 and below (#9) 2021-05-04 00:39:10 +01:00
README.md 0.1.0-beta.10 2018-11-17 16:23:56 +10:30

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']
});