Skip to content

Linaria + Next.js webpack configuration #318

Closed
@orpheus

Description

@orpheus

Using react and nextjs. The div element gets the className: ci74fup but no styles are applied. What am I missing?
Am I limited to using only the react-helpers?

import React from 'react'
import Head from 'next/head'
import { css } from 'linaria';

const container = css`
	background-color: red;
	`;

export default () => {
	return (
	<>
		<Head><title>CSS Playground</title></Head>
		<div className={container}>
			Hello World
		</div>
	</>
	)
}

.babelrc
{ "presets": ["next/babel", "linaria/babel"] }

linaria-issue-1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions