-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible babel issues when migrating existing CRA #30
Comments
I'm having the exact same issue with
I'm guessing there must be a difference with the |
My "solution" was to switch to cra-universal, which I've been quite happy with and did not require ejection. |
I'll check it out, thanks for the suggestion! |
any updates? running into this same issue with |
Same here. Have you got the solution? @lyndseyjw |
I have a working CRA app that I want to add SSR to. This SDK looks promising!
I tried following the steps in the readme. Although the server does start, during loading I get a compilation error:
(function (exports, require, module, __filename, __dirname) { .react-datepicker-popper[data-placement^="bottom"] .react-datepicker__triangle, .react-datepicker-popper[data-placement^="top"] .react-datepicker__triangle, .react-datepicker__year-read-view--down-arrow, ^ SyntaxError: Unexpected token . at createScript (vm.js:53:10) at Object.runInThisContext (vm.js:95:10) at Module._compile (module.js:543:28) ...
This appears to be because I'm importing a css file from node_modules like so:
import "react-datepicker/dist/react-datepicker.css";
This works in the regular CRA app, but not after the migration. I'm not exactly sure how to fix that, but I assumed I might need to use config-overrides.js to add some custom babel configuration? However, when I add the default config-overrides.js. I get the following error:
/Users/<blahblahblah>/client/config-overrides.js:4 ...config, ^^^ SyntaxError: Unexpected token ... at createScript (vm.js:53:10) at Object.runInThisContext (vm.js:95:10) at Module._compile (module.js:543:28)
I'd rather address the first issue without having a custom configuration, but perhaps the second issue gives you a clue?
Thanks.
The text was updated successfully, but these errors were encountered: