MCPcopy Create free account
hub / github.com/thetarnav/solid-devtools / clean_css_plugin

Function clean_css_plugin

packages/overlay/build.ts:19–33  ·  view source on GitHub ↗
(is_dev: boolean)

Source from the content-addressed store, hash-verified

17const entry_index_noop_filename = path.join(src_dirname, `index_noop.ts`)
18
19function clean_css_plugin(is_dev: boolean): esb.Plugin {
20 return {
21 name: 'custom',
22 setup(build) {
23 if (is_dev) return
24
25 // minify css during build
26 build.onLoad({filter: /\.css$/}, async args => {
27 const file = await fsp.readFile(args.path)
28 const css = await esb.transform(file, {loader: "css", minify: true})
29 return {loader: "text", contents: css.code}
30 })
31 },
32 }
33}
34
35
36export default () => {

Callers 1

build.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…