Import assignment cannot be used when targeting ECMAScript 2015 modules

后端 未结 7 807
谎友^
谎友^ 2021-02-05 01:14

I\'m trying to use the follwing line:

import Clipboard = require(\'clipboard\');

and I get the following error:

   [default] c:         


        
相关标签:
7条回答
  • 2021-02-05 01:45

    In case you are using Angular CLI: I was able to compile my project after I had set the value of module to es2016 in the file src/tsconfig.app.json.

    0 讨论(0)
提交回复
热议问题