google-chrome-extension - 在 chrome 扩展(内容脚本等)中使用 es6
问题描述
我在我的 js content_script 文件中使用 ES6 语法。
当我尝试使用它并在 chrome 中调试时,我得到:
Cannot use import statement outside a module.
是不是chrome扩展不支持es6?
解决方案
推荐阅读
- javascript - Json 到 csv 动态列 javascript
- python - 将 Google 表格转换为 PDF 并存储在与表格相同的 Google Drive 文件夹中
- android - 使用 localhost Laravel api 测试改造
- c++ - Arduino + ESP8266 发送一次 POST 但每隔一次失败
- time-series - 遗传算法时间序列预测创建初始种群
- vba - 微软访问。VBA。如何仅在不存在的情况下创建具有 1 条记录的临时表
- express - 让 express.js 将任何 html 文件路径的所有子路径重定向到自身
- java - 强化增量扫描:java.lang.ClassCastException
- symfony - Symfony API:测试内容是否有密钥
- pandas - 如何计算列表数据的计数和首次出现?