Hi, I've recently started work on a little custom extension for my forum. I followed the guide and used the flarum-cli to build the skeleton before starting work. However, it seems to be all referencing a future version of Flarum (I think). I'm brand new to Flarum dev but not to PHP/JS dev but I basically had to use an old version of the 'flarum-webpack-config' package just to make it build and add loads of manual Babel dependencies.
It feels very hacky and I just genuinely need to know if I'm missing. When I first built the frontend it kept making reference to flarum.reg which was undefined which it seems to do completely be default. Moving the webpack config dependency back and adding the Babel bits so it'll actually build solved the problem so I was hoping to get some advice.
My dev dependencies for Yarn are basically this:
"devDependencies": {
"@babel/core": "^7.28.5",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-private-methods": "^7.18.6",
"@babel/plugin-transform-react-jsx": "^7.27.1",
"@babel/plugin-transform-runtime": "^7.28.5",
"@babel/preset-env": "^7.28.5",
"@babel/preset-react": "^7.28.5",
"@babel/preset-typescript": "^7.28.5",
"babel-loader": "^10.0.0",
"flarum-webpack-config": "^1.0.0",
"webpack": "^5.65.0",
"webpack-cli": "^4.9.1"
},
Whereas the skeleton uses flarum-webpack-config v3 and none of the rest was required. To clarify: it is building, but it feels like I'm doing something wrong.
Am I missing something basically?