-
-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Browser scripts cannot have imports or exports. Use a <script type="module"> instead #51
Comments
I saw this issue today too. It's possible that Parcel released another breaking change a usual. Try adding a |
@fregante, thank you, adding $ git diff
diff --git a/source/options.html b/source/options.html
index 40894b3..57cb974 100644
--- a/source/options.html
+++ b/source/options.html
@@ -28,4 +28,4 @@
</div>
</form>
-<script src="options.js"></script>
+<script type="module" src="options.js"></script> $ npm run build
> build
> parcel build source/manifest.json --no-content-hash --no-source-maps --dist-dir distribution --no-cache --detailed-report 0
✨ Built in 2.34s
distribution/manifest.json 633 B 39ms
distribution/icon.png 1.14 KB 60ms
distribution/background.js 30.88 KB 511ms
distribution/options.html 925 B 617ms
distribution/options.9515e12b.css 616 B 1.28s
distribution/options.81ccf7e2.js 53.22 KB 727ms |
Here is a pull request #52. |
If this is caused by an update, I did not upgrade any packages, and I still received this error, which brought a lot of unnecessary trouble to the developers and brought great uncertainty to the stability of the project! |
1 similar comment
If this is caused by an update, I did not upgrade any packages, and I still received this error, which brought a lot of unnecessary trouble to the developers and brought great uncertainty to the stability of the project! |
Dear Maintainer(s),
I've got the following error trying to build the extension:
I thought I probably doing something wrong and made a GitHub clone but clicking "Use this template" button as README.md recommends, but got the same issue.
What am I doing wrong?
The text was updated successfully, but these errors were encountered: