Skip to content

esbuild plugin does not do anything at all #1432

@MazeChaZer

Description

@MazeChaZer

Environment

  • Linaria version: 6.2.0
  • Bundler (+ version): esbuild 0.24.2, @wyw-in-js/esbuild 0.5.5
  • Node.js version: 23.4.0
  • OS: Arch Linux

Description

I added the linaria plugin to the esbuild config, but it does not do anything.

Reproducible Demo

  1. Create an empty directory
  2. npm install @linaria/core @wyw-in-js/babel-preset @wyw-in-js/esbuild esbuild
  3. Add src/index.ts with the following content:
import { css } from "@linaria/core"

const className = css`
    width: 100px;
`
  1. Add esbuild.mjs, copy content from docs:
import wyw from '@wyw-in-js/esbuild';
import esbuild from 'esbuild';

const prod = process.env.NODE_ENV === 'production';

esbuild
  .build({
    entryPoints: ['src/index.ts'],
    outdir: 'dist',
    bundle: true,
    minify: prod,
    plugins: [
      wyw({
        filter: /\.(js|jsx|ts|tsx)$/,
        sourceMap: prod,
      }),
    ],
  })
  .catch(() => process.exit(1));
  1. node esbuild.mjs

Example as a zip file: linaria-repro.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug report 🦗Issue is probably a bug, but it needs to be checkedneeds: complete repro 🖥️Issue need to have complete repro provided

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions