I'm in the process of upgrading our extensions to beta.8. All went quite smoothly so far, I'm really impressed!
Now I'm working on the frontend. Converting the js code to webpack was a breeze. Now I try to override the view function of the TagsPage component. According to the README of flarum-webpack-config one can inject extension modules with the useExtensions option:
webpack.config.js
var config = require('flarum-webpack-config');
module.exports = config({
useExtensions: ['flarum/tags']
});
forum.js
import { TagsPage } from '@flarum/tags/forum';
It compiles, but in the browser it throws a TypeError: _flarum_tags_forum__WEBPACK_IMPORTED_MODULE_4__ is undefined.
Does anyone know whats going wrong here?
Edit I found a dirty workaround:
const TagsPage = flarum.core.compat["tags/components/TagsPage"];