</body>
.Access-Control-Allow-Origin: http://localhost:8080
, то попробуй его добавить в список заголовков в конфиге. Лично мне его хватало с головой. <script type="module" src="main.js"></script>
import { Utils } from "./utils.js";
new Utils().hi();
export class Utils {
hi() {
alert("hi");
}
}
location / {
try_files $uri /index.html;
}
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.html [QSA,L]
class AAA
{
public $test;
public function __construct($a = 123)
{
$this->test = $a;
}
}
class BBB extends AAA {}
echo (new BBB())->test; // 123