首页 > 解决方案 > 在 chrome 扩展(内容脚本等)中使用 es6

问题描述

我在我的 js content_script 文件中使用 ES6 语法。

当我尝试使用它并在 chrome 中调试时,我得到:

Cannot use import statement outside a module.

是不是chrome扩展不支持es6?

标签: google-chrome-extension

解决方案


推荐阅读