Attività di "karolis"

  • ABP Framework version: v4.4.2
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes

Hello, I am getting this error: Uncaught SyntaxError: Cannot use import statement outside a module

I am trying to import npm package within .jsx file:

import {AgGridTable} from 'ag-grid-react'

The packages are provided via .cshtml file

src="~/libs/react/umd/react.development.js" 
src="~/libs/react-dom/umd/react-dom.development.js" 
src="~/libs/ag-grid-react/bundles/ag-grid-react.min.js"

Packages.json:

"type": "module:

I can access React methods like that without import, but this becomes a problem with other packages/libraries:

const { useState, useEffect } = React

So far I have tried changing types in script tag, package.json type and different script src files, but no luck. Can someone please explain how to fix import? Thank You!

1 - 1 di 1
Made with ❤️ on ABP v8.2.0-preview Updated on marzo 25, 2024, 15:11