fell-lucas / chrome-extension-template-preact-vite

MIT License
80 stars 5 forks source link

Uncaught SyntaxError: Cannot use import statement outside a module #5

Open delai opened 2 years ago

delai commented 2 years ago

If one module is imported by more than two module, Vite (or say rollup) will not include the source code to the output file -- in other words: remain import sentence there:

import { p as aModule } from "../../assets/aModule.0b895f6d.js";

It looks like chrome extension runtime do not support import on the fly, will get error:

Uncaught SyntaxError: Cannot use import statement outside a module

any Idea?

github-actions[bot] commented 2 years ago

Thank you for your contribution. We will check and reply to you as soon as possible.