Replies: 3 comments 2 replies
-
Bah, sorry about that. Are you using Create Snowpack App? In that case, Babel is already set to build your JavaScript, which is where that error is coming from. If you load http://localhost:8080/_dist_/views/Components/components/Header/Header.js directly in the browser, what do you see? Is there any error output when you do? Also fyi, Snowpack v2.7.0 is about to be released which may have a bug fix for this, you can try it with |
Beta Was this translation helpful? Give feedback.
-
Hey Thanks for getting back so quick! I am using the Create Snowpack App with the When trying the babel cli method from the docs as I linked above with When reverting the setup back to
Snowpack
http://localhost:8080 • http://192.168.86.140:8080 • http://10.7.0.2:8080
Server started in 29ms.
▼ Console
[error] [404] /_dist_/views/Components/components/Header/Header.js
✘ /Users/joe/var/www/create-snowpack-app-react/public/_dist_/views/Components/components/Header/Header.js
✘ /Users/joe/var/www/create-snowpack-app-react/public/_dist_/views/Components/components/Header/Header.mjs
✘ /Users/joe/var/www/create-snowpack-app-react/public/_dist_/views/Components/components/Header/Header.jsx
✘ /Users/joe/var/www/create-snowpack-app-react/public/_dist_/views/Components/components/Header/Header.ts
✘ /Users/joe/var/www/create-snowpack-app-react/public/_dist_/views/Components/components/Header/Header.tsx
✘ /Users/joe/var/www/create-snowpack-app-react/src/views/Components/components/Header/Header.js
✘ /Users/joe/var/www/create-snowpack-app-react/src/views/Components/components/Header/Header.mjs
✘ /Users/joe/var/www/create-snowpack-app-react/src/views/Components/components/Header/Header.jsx
✘ /Users/joe/var/www/create-snowpack-app-react/src/views/Components/components/Header/Header.ts
✘ /Users/joe/var/www/create-snowpack-app-react/src/views/Components/components/Header/Header.tsx |
Beta Was this translation helpful? Give feedback.
-
@FredKSchott figured it out... another classic case of PLBKAC Since migrating to snowpack my relative paths are now not working, I did a quick find & replace for Hopefully here is a way to mimic that behaviour in snowpack without further find & replaces. Thanks for trying to help. |
Beta Was this translation helpful? Give feedback.
-
Error in browser from an CRA that worked previously, page doesn't load properly, console reveals:
Loading module from “http://localhost:8080/_dist_/views/Components/components/Header/Header.js” was blocked because of a disallowed MIME type (“”).localhost:8080
I presume this is because snowpack doesn't support jsx inside
.js
files as stated here:When trying the recommended method to handle this with babel CLI setup:
On a build I get the following error:
Am I following these steps correctly? What am I doing wrong here?
Beta Was this translation helpful? Give feedback.
All reactions