dlehmhus / next-with-linaria

Linaria webpack loader for Next.js
MIT License
104 stars 6 forks source link

Incompatibility withContentLayer #20

Open jeremt opened 1 year ago

jeremt commented 1 year ago

Hello!

I tried to setup contentLayer and linaria together for a project, but I can't use the plugin with contentLayer without getting this error:

image

I simply used the default contentLayer project : https://github.com/contentlayerdev/next-contentlayer-example, and added linaria to the config:

const {withContentlayer} = require('next-contentlayer');
const withLinaria = require('next-with-linaria');
const withPlugins = require('next-compose-plugins');

/** @type {import('next').NextConfig} */
const nextConfig = {
    experimental: {
        appDir: true,
    },
};

module.exports = withPlugins([withContentlayer, withLinaria], nextConfig);