Open reesscot opened 1 year ago
Hello, is there an update on this?
I guess it's about exporting the theme.css file. I solved it by:
"fesm2015": "fesm2015/aws-amplify-ui-angular.mjs", "typings": "index.d.ts", "exports": { "./package.json": { "default": "./package.json" }, ".": { "types": "./index.d.ts", "esm2020": "./esm2020/aws-amplify-ui-angular.mjs", "es2020": "./fesm2020/aws-amplify-ui-angular.mjs", "es2015": "./fesm2015/aws-amplify-ui-angular.mjs", "node": "./fesm2015/aws-amplify-ui-angular.mjs", "default": "./fesm2020/aws-amplify-ui-angular.mjs" }, "./theme.css": "./theme.css" // I added here. }, "sideEffects": false }
Critical PS: Change import @import '@aws-amplify/ui-angular/theme.css'; (remove the ~ at the beggining)
🐛 bug report
Preflight Checklist
Description of the problem
I cannot use CSS
@import
statement fromnode_modules
dependencies, I get a TypeError "Path must be a string. Received Null"Seem related to: https://github.com/codesandbox/codesandbox-client/issues/6211
How has this issue affected you? What are you trying to accomplish?
To Reproduce
See: https://codesandbox.io/s/css-import-error-cwpxnl
@aws-amplify/ui-angular
@import
statement instyles.css
as follows:TypeError "Path must be a string. Received Null"
Note that you can see the
theme.css
file is indeed present in the package: https://www.npmjs.com/package/@aws-amplify/ui-angular?activeTab=exploreLink to sandbox: https://codesandbox.io/s/css-import-error-cwpxnl
Your Environment