viclafouch / mui-color-input

📌 A color input designed for MUI (Material ui) V6 built with TinyColor
https://viclafouch.github.io/mui-color-input/
60 stars 20 forks source link

Module parse failed: Unexpected token #13

Closed kresogalic8 closed 1 year ago

kresogalic8 commented 1 year ago

Hey, I installed the package and i got this error:

Screenshot 2023-03-15 at 13 10 19

here is the tsconfig.json

{
  "compilerOptions": {
    "baseUrl": "src",
    "target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
    "module": "commonjs" /* Specify what module code is generated. */,
    "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */,
    "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,

    "strict": false /* Enable all strict type-checking options. */,
    "noImplicitAny": false /* Enable error reporting for expressions and declarations with an implied `any` type.. */,
    "skipLibCheck": true,
    "jsx": "react"
  },
  "include": ["src"]
}
viclafouch commented 1 year ago

See https://github.com/viclafouch/mui-color-input/issues/3

kresogalic8 commented 1 year ago

Whats the solution? Adding optional chaining in webpack config ?