Closed amitava82 closed 5 years ago
@amitava82 Yup, it's better to import global style in top level. Anything I can help you?
Should be able to import scss from node_nodules relavant for each chunk. This seems to be a bug that importing from node modules fails but not for Local scss files. Importing everything in single file isn't optimal for a large app.
On Sun, Aug 18, 2019, 8:47 PM Welly notifications@github.com wrote:
@amitava82 https://github.com/amitava82 Yup, it's better to import global style in top level. Anything I can help you?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/wellyshen/react-cool-starter/issues/236?email_source=notifications&email_token=AAJYMKWVOUXXBUWDTTX3DGLQFFRX3A5CNFSM4IMEAUF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4RCCPA#issuecomment-522330428, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJYMKTPAW4VZ4QHBKUBEBTQFFRX3ANCNFSM4IMEAUFQ .
@amitava82 I will check it.
@amitava82 I can import bootstrap.scss from UserInfo.scss without building error, plz see here
@wellyshen Nope, I tried your branch, it does not work. navigate to http://localhost:3000/UserInfo/1
and then hit refresh browser.
@amitava82 How did you try my branch? I didn't see error on http://localhost:3000/UserInfo/1
Usual git clone and check out your bootstrap branch
On Sun, Aug 25, 2019, 12:21 PM Welly notifications@github.com wrote:
@amitava82 https://github.com/amitava82 How did you try my branch?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/wellyshen/react-cool-starter/issues/236?email_source=notifications&email_token=AAJYMKVJ2HQ2TPG6JIEIRPLQGITWDA5CNFSM4IMEAUF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5CNVEY#issuecomment-524606099, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJYMKSHNPZVCTSWWGGO3OLQGITWDANCNFSM4IMEAUFQ .
@amitava82 So wired... May I know your environment? e.g. node version, OS etc.
node v8.15.1, OSX latest.
Used v12.1.0
, but no luck.
@amitava82 how about removing ~
character.
In my project, I just use like below and it works
import '@package/folder_name/dist/ace.css';
Yeah importing like so @import 'node_modules/bootstrap/scss/bootstrap';
works.
Bug
Importing a scss (eg, bootstrap) fails with error
This happens when import is done in lazy loaded component. How to reproduce:
@import "~bootstrap/scss/bootstrap";
at the top ofpages/UserInfo/styles.scss
http://localhost:3000/UserInfo/1
or refresh page. It'll show "Not Found :(" and above error in console.Seems to work if imported to top level component or index route component.