Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Conversation

m1cr0man
Copy link

When using this plugin with Typescript and other file types with inline CSS, it is useful to be able to specify which loader to use on processed files. It would otherwise default to "js", as per the esbuild docs.

Example usage:

const buildConfig = {
  entryPoints: ["src/index.ts"],
  bundle: true,
  outdir: "dist",
  plugins: [
    postcssLiteral({
      filter: /\.ts/,
      loader: "ts",
    }),
  ]
}

Also I'd like to say thanks for making this module. I also tried the postcss and postcss2 (non-inline) plugins and both gave me issues either with shadow DOM or failure to parse when adding Tailwind to my Lit2-based webcomponents project. 👍

When using this plugin with Typescript and other
file types with inline CSS, it is useful to be able
to specify which loader to use on processed files.
It would otherwise default to "js", as per the esbuild
docs.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant