Tamper monkey Cannot use import statement outside a module

I am getting the error Cannot use import statement outside a module when importing a script in tamper monkey that uses import in the code.

How can I keep using that script? is there a way to set tamper monkey to use modules?
like type="module" that we use in script tags?