The page loaded from the menu does not see the imported modules

On the page I have a button with a drop-down menu. When I click an item from the menu, the page is loaded into a separate <div>. Unfortunately, this page does not load the included script in which the modules are imported.
In index.html code:

<a href="#" onclick='mainContent("page.html");'>Page</a>

in page.html

<script src="run.js></script>

in run.js

import {one} from '.one.js';
import {two} from '.two.js';

Of cource in one.js and in two.js there are export objects.
When the page.html is running separately - work perfectly.
Why the page.html cannot run scripts when is loaded from the menu button (to <div>)?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.