Skip to content
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

Example with next.js #154

Closed
shashkovdanil opened this issue Mar 28, 2019 · 4 comments
Closed

Example with next.js #154

shashkovdanil opened this issue Mar 28, 2019 · 4 comments

Comments

@shashkovdanil
Copy link
Contributor

Need example with next.js

@shashkovdanil
Copy link
Contributor Author

@stephenburns-accedo
Copy link

This example is no longer available on this url ^

@rvetere
Copy link

rvetere commented Jan 9, 2023

Example for next.js would highly be appreciated!

Best i've found so far: vercel/next.js#9242 (comment)

@anatol-grabowski
Copy link

Here is (most likely) the example from the link above: https://github.com/shashkovdanil/next.js/tree/9f6dcae4888f48e042d82d493c405224fbe978fa/examples/with-astroturf

Here is what kind of worked for me on a clean next.js (13.4.8) project:

yarn add astroturf postcss-nested
// postcss.config.js
module.exports = {
  plugins: {
    tailwindcss: {},
    autoprefixer: {},
    'postcss-nested': {},
  },
}
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
  webpack: config => {
    config.module.rules.push({
      test: /\.tsx$/,
      use: ['astroturf/loader']
    })
    return config
  }
}

module.exports = nextConfig

Unfortunately styles are not updated on hot reload. Any ideas how to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants