-
Notifications
You must be signed in to change notification settings - Fork 315
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
Tailwind SourceMap/EsBuild Issue #247
Comments
I've started encountering the same error after updating the Indie Stack from version 1.7 to 2.8. Any updates on this? |
If your using vite, check to make sure your css imports have the ?url syntax. Seemed to fix my issue. https://remix.run/docs/en/main/future/vite#fix-up-css-imports-referenced-in-links |
Yeah, this solved my issue, if anyone else encounters this is how my root.tsx file looks after creating a remix app from the import {
Links,
LiveReload,
Meta,
Outlet,
Scripts,
ScrollRestoration,
} from "@remix-run/react";
import type { LinksFunction } from "@remix-run/node";
import styles from "./tailwind.css?url";
export const links: LinksFunction = () => [{ rel: "stylesheet", href: styles }];
export function Layout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<head>
<meta charSet="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<Meta />
<Links />
</head>
<body>
{children}
<ScrollRestoration />
<Scripts />
<LiveReload />
</body>
</html>
);
}
export default function App() {
return <Outlet />;
} Hope this helps. |
@Rioba-Ian Thanks that solved my issue too. |
|
Have you experienced this bug with the latest version of the template?
Yes
Steps to Reproduce
npx create-remix@latest --template remix-run/indie-stack
npm run dev
Sources
tab.app
group underlocalhost:3000
<no source>
- it appears to be a stylesheetThere will also be an error in the Terminal that you used to run
npm run dev
:This seems to relate to the
Tailwind
Source Map that is created by EsBuild (I assume).The contents of
tailwind-H5XCNLFK.css.map
appears to also include a reference to the<no source>
file, which may then result in the error:If you remove the Tailwind import from
root.tsx
file, it doesn't build these files and that removes the error from the build.This was a clean install of the Indie Stack. I noticed the issue on a few other apps that were started on the Indie stack some time ago, and tried a clean copy to see if it was something that I had accidentally done. It appears to be something else however.
Node 18
Expected Behavior
I would expect that the file didn't get included in the bundle. Although, I'm not sure what it does or if it will cause any major problems, beyond some annoying errors.
Actual Behavior
It is included and an error is thrown when accessing the DevTools.
The text was updated successfully, but these errors were encountered: