Currently, I am in the process of making modifications to @editorjs/nested-list. To streamline my testing process without extensive installations, I have created a simple web page:
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/@editorjs/editorjs@latest"></script>
</head>
<body>
<h1>EditorJS</h1>
<div class="container">
<div id="editorjs"></div>
</div>
<script type="module" src="./index.js"></script>
<script>
const editor = new EditorJS({
holder: 'editorjs',
}
);
</script>
</body>
</html>
The file index.js
contains the source code for nested-list.
Upon testing, an error message is displayed:
Access to script at 'file:///.../nested-list/src/index.js' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https.
I am seeking the simplest way to test my modifications to index.js immediately. Is there a potential HTML modification that can resolve this issue, or do I need to consider a different toolchain?
P.S. An unanswered question similar to mine can be found here.
P.P.S. This related post assumes the presence of an app (e.g., "MyApp"), whereas, in my case, no such app exists. Should I opt to create a dummy app? The thought of doing so seems somewhat inconvenient.