Announcement

Collapse
No announcement yet.

Cannot use import statement outside a module

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cannot use import statement outside a module

    Click image for larger version

Name:	image.png
Views:	96
Size:	19.4 KB
ID:	101610
    Can you help me to explain more about this error and how to fix it. Thank very much​

  • #2
    Likely, your are using ES6 modules in your customization. Use AMD instead.

    Comment


    • #3
      Originally posted by yuri View Post
      Likely, your are using ES6 modules in your customization. Use AMD instead.
      Thank for your reply, yuri

      But, It is module from our partner, that is using ES6. How to use it in our customization module?

      Comment


      • #4
        For new extensions originated from the ext-template, it will ask whether you want to use ES6 modules upon initialization. For existing extensions, currently there's no guideline.

        Comment


        • #5
          Originally posted by yuri View Post
          For new extensions originated from the ext-template, it will ask whether you want to use ES6 modules upon initialization. For existing extensions, currently there's no guideline.
          Thank for you reply yuri

          Click image for larger version

Name:	image.png
Views:	51
Size:	29.4 KB
ID:	101644

          what is content in init js file? can you give a example?

          Comment


          • #6
            I can't give an example. I'm quite busy on daily basis. Please invest some time. Try the ext-template initialization and then see what the file is.

            Comment

            Working...
            X