Skip to content

Commit

Permalink
add postcss and tailwindcss to unimplemented files (vercel#137)
Browse files Browse the repository at this point in the history
Note that this doesn't completely close out
[vercel#54](vercel/web-tooling-internal#54) as the
[tailwindcss config is
optional](https://tailwindcss.com/docs/configuration). I'm digging
deeper at additional ways to detect tailwind, but putting this up since
it's a strict improvement.

```
olszewski@chriss-mbp next-dev % cargo run -p next-dev -- /tmp/with-tailwindcss-app
   Compiling next-dev v0.1.0 (/Users/olszewski/code/vercel/the-three-body/crates/next-dev)
    Finished dev [unoptimized + debuginfo] target(s) in 11.61s
     Running `/Users/olszewski/code/vercel/the-three-body/target/debug/next-dev /tmp/with-tailwindcss-app`
server listening on: http://localhost:3000
error [unimplemented]
  /private/tmp/with-tailwindcss-app/next.config.js
    Feature not yet supported
    Handling the file `next.config.js` is currently unimplemented

  /private/tmp/with-tailwindcss-app/postcss.config.js
    Feature not yet supported
    Handling the file `postcss.config.js` is currently unimplemented

  /private/tmp/with-tailwindcss-app/tailwind.config.js
    Feature not yet supported
    Handling the file `tailwind.config.js` is currently unimplemented

[200] / (3045ms)
initial compilation 3468ms (3044ms task execution, 48380 tasks)
updated in 874ms (8990 tasks)
```
  • Loading branch information
chris-olszewski authored Oct 20, 2022
1 parent 7238a4f commit 5ecbff6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion crates/next-dev/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,13 @@ async fn handle_issues<T: Into<RawVc>>(source: T, console_ui: ConsoleUiVc) -> Re
}

async fn handle_unimplemented_files(project_path: &FileSystemPathVc) -> Result<()> {
const UNIMPLEMENTED_FILES: [&str; 3] = ["next.config.js", "babel.config.js", ".babelrc.js"];
const UNIMPLEMENTED_FILES: [&str; 5] = [
"next.config.js",
"babel.config.js",
".babelrc.js",
"postcss.config.js",
"tailwind.config.js",
];
for file in UNIMPLEMENTED_FILES {
let file_path = project_path.join(file);
let file_type = file_path.get_type().await?;
Expand Down

0 comments on commit 5ecbff6

Please sign in to comment.