antfu-collective / vitesse-webext

⚡️ WebExtension Vite Starter Template
MIT License
2.92k stars 225 forks source link

error from bg.js :Uncaught SyntaxError: Cannot use import statement outside a module #128

Closed robsuncn closed 1 year ago

robsuncn commented 1 year ago

Describe the bug

When I try to import the extension compiled with the latest template, the browser throws an error directly. error

Reproduction

Reproduction

System Info

System:
    OS: macOS 13.3.1
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 608.16 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 16.19.0 - /usr/local/bin/node
    npm: 8.19.3 - /usr/local/bin/npm
  Browsers:
    Chrome: 113.0.5672.63
    Safari: 16.4

Used Package Manager

pnpm

Validations