Sha256: 3de7848f325ec6d68852db2988e89d5c9df40dfd7290bf703c8596af5e6555f2

Contents?: true

Size: 937 Bytes

Versions: 15

Compression:

Stored size: 937 Bytes

Contents

// You can add "full-stack" esbuild plugins here that you wish to share between
// the frontend bundles and Lit SSR. Just import your plugins and add them and
// any additional configuration to the `plugins` array below.

// This plugin will let you import `.lit.css` files as sidecar stylesheets.
// Read https://www.bridgetownrb.com/docs/components/lit#sidecar-css-files for documentation.
const { litCssPlugin } = require("esbuild-plugin-lit-css")
const postcssrc = require("postcss-load-config")
const postcss = require("postcss")

module.exports = {
  plugins: [
    litCssPlugin({
      filter: /\.lit\.css$/,
      transform: async (css, { filePath }) => {
        const postCssConfig = await postcssrc()
        const postCssProcessor = postcss([...postCssConfig.plugins])

        const results = await postCssProcessor.process(css, { ...postCssConfig.options, from: filePath })
        return results.css
      }
    }),
  ]
}

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
bridgetown-core-2.0.0.beta3 lib/bridgetown-core/configurations/lit/esbuild-plugins.js
bridgetown-core-2.0.0.beta2 lib/bridgetown-core/configurations/lit/esbuild-plugins.js
bridgetown-core-2.0.0.beta1 lib/bridgetown-core/configurations/lit/esbuild-plugins.js
bridgetown-core-1.3.4 lib/bridgetown-core/configurations/lit/esbuild-plugins.js
bridgetown-core-1.3.3 lib/bridgetown-core/configurations/lit/esbuild-plugins.js
bridgetown-core-1.3.2 lib/bridgetown-core/configurations/lit/esbuild-plugins.js
bridgetown-core-1.3.1 lib/bridgetown-core/configurations/lit/esbuild-plugins.js
bridgetown-core-1.3.0 lib/bridgetown-core/configurations/lit/esbuild-plugins.js
bridgetown-core-1.3.0.beta3 lib/bridgetown-core/configurations/lit/esbuild-plugins.js
bridgetown-core-1.3.0.beta2 lib/bridgetown-core/configurations/lit/esbuild-plugins.js
bridgetown-core-1.3.0.beta1 lib/bridgetown-core/configurations/lit/esbuild-plugins.js
bridgetown-core-1.2.0 lib/bridgetown-core/configurations/lit/esbuild-plugins.js
bridgetown-core-1.2.0.beta5 lib/bridgetown-core/configurations/lit/esbuild-plugins.js
bridgetown-core-1.2.0.beta4 lib/bridgetown-core/configurations/lit/esbuild-plugins.js
bridgetown-core-1.2.0.beta3 lib/bridgetown-core/configurations/lit/esbuild-plugins.js