I'm following the docs to write a simple extension. Here is what I did:
1- Installed Node.js & webpack
2- I created the extension using the following command inside the "packages" folder (a folder I defined)
$ npx @friendsofflarum/create-flarum-extension acme-flarum-hello-world
3- I ran this command inside my flarum root folder
$ composer require acme/flarum-hello-world *@dev
4- Inside packages/acme-flarum-hello-world/js
I ran the following
$ npm install
$ npm run dev
But the changes I make to the forum/index.js file are not reflected!
The extend.php
`<?php
/*
- This file is part of acme/flarum-hello-world.
*
- Copyright (c) 2021 Ik.
*
- For the full copyright and license information, please view the LICENSE.md
- file that was distributed with this source code.
*/
namespace Acme\FlarumHelloWorld;
use Flarum\Extend;
return [
(new Extend\Frontend('forum'))
->js(DIR.'/js/dist/forum.js')
->css(DIR.'/resources/less/forum.less'),
(new Extend\Frontend('admin'))
->js(DIR.'/js/dist/admin.js')
->css(DIR.'/resources/less/admin.less'),
];`