Skip to content

Allow css tag to be exported #1430

@dndrsn

Description

@dndrsn

Describe the enhancement

Allow/enable export of the css tag from another file. For example...

// ./style.js

export { css } from '@linaria/core';

...

// ./other-file.js

import { css, somethingElse, anotherExport } from './style.js';

When this is done currently, the following error is produced...

Error: Using the "css" tag in runtime is not supported. Make sure you have set up the Babel plugin correctly.

Motivation

This would be convenient for organizational flexibility. In my use case, I have helper functions that are naturally imported with the css tag. I would prefer to import from a single file with a single line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement: proposal 💬Improvement of current behaviour that needs to be discussedneeds: triage 🏷Issue needs to be checked and prioritized

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions