-
Notifications
You must be signed in to change notification settings - Fork 298
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
Next.js 13 - Builds not outputting css on Windows #1086
Comments
I'm having the same issue here on Windows 10 |
I'm still in the process of setting up a windows dev environment, but I'll take a look at it when I can. |
Also happening in Linux (Ubuntu). |
It works fine for me, on MacOS though. I wouldn't expect it to behave very differently between ubuntu and macos. Also general update, I'm reproduce the issue on windows. It's odd that classnames are in the markup, but there are no CSS files in the document |
Same here on Windows 11, but not be reproduced on Ubuntu 22.04 (WSL). |
Same here on Windows 10 (19045.3208), Node.js 19.2.0, latest versions of |
Same here. |
still doing some debugging, but it's server components specifically that are failing, adding a |
This works for components, what about global styles, any workaround? |
I did find a workaround, but ended not needing it, as it's a bit of an inelegant hack, but if you use a wildcard import and ensure you use the resulting variable in some capacity, it should pickup the globalStyles
|
Uh, really ugly, but it works, thank you! |
I've recently been migrating my blog from Gatsby to Next.js and I'm having the same problem. I found a solution at style9-webpack (SukkaW/style9-webpack#1) and made another Next.js plugin for vanilla-extract that works fine on Windows/Linux/macOS, if you're having a similar problem, you can try @syfxlin/next-plugin-vanilla-extract. |
Is this something that can be contributed here? I'm sure many of us would prefer not to see fragmentation, especially as vanilla-extract and or next continue to evolve |
Hi @GeeWizWow, @syfxlin/next-plugin-vanilla-extract hasn't been fully tested, for example I'm not sure if it works in the Next.js Pages Directory yet. Once it's confirmed to be reliable, I can contribute here, thanks! |
I gave up // 2023/10/03; windows 11; [email protected]; @vanilla-extract/[email protected]
const { VanillaExtractPlugin } = require('@vanilla-extract/webpack-plugin/next');
const { default: MiniCssExtractPlugin } = require('next/dist/build/webpack/plugins/mini-css-extract-plugin');
/** @type {import('next').NextConfig} */
const nextConfig = {
webpack(config) {
config.plugins.unshift(new MiniCssExtractPlugin());
config.plugins.unshift(new VanillaExtractPlugin());
config.module.rules.unshift({
test: /vanilla\.virtual\.css$/,
use: [
MiniCssExtractPlugin.loader,
require.resolve('css-loader'),
VanillaExtractPlugin.loader,
],
});
return config;
},
};
module.exports = nextConfig; |
@sherluok Does the fix to the next plugin from #1180 work for you? |
edit: fix is pending so meanwhile use appDir: true for temp solution https://github.com/plrs9816/vanilla-extract-app-dir Something broke again in next 13.5? In 13.4 it works fine but the css is not generated in 13.5. (I only tested in windows) Strangely the above demo is working, because I added unnecessary
|
@plrs9816 This should hopefully be fixed by #1193 |
Describe the bug
Clone the "should be working repo" in Windows
Inspect with DevTools, and see footer class being generated without styles
Need help @markdalgleish @SuttonJack
Reference in discussion
Edit:
Running the app inside container seems fine.
Reproduction
https://github.com/SuttonJack/vanilla-extract-app-dir
System Info
Used Package Manager
pnpm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: