material-foundation / material-color-utilities

Color libraries for Material You
Apache License 2.0
1.57k stars 134 forks source link

Module parse Error Typescript - Appropriate loader #115

Open lsprung-lts opened 10 months ago

lsprung-lts commented 10 months ago

Hi, in my angular project I am unable to load 4 instances. I believe thats because of operations like ?? or ||.

This is one of the Errors:

_ERROR in ./node_modules/@material/material-color-utilities/utils/theme_utils.js 101:27 Module parse failed: Unexpected token (101:27) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders__

| export function applyTheme(theme, options) { > const target = options?.target || document.body; | const isDark = options?.dark ?? false; | const scheme = isDark ? theme.schemes.dark : theme.schemes.light;

Does anybody know how to configure a loader for a specific file?