| 42 | * '@media screen and (max-width: 640px)': { .. } |
| 43 | */ |
| 44 | const cssReplacePlugin = (options) => () => ({ |
| 45 | json: { |
| 46 | pre: (json) => { |
| 47 | traverse(json).forEach(function (item) { |
| 48 | if (item?.['@type'] === '@builder.io/mitosis/node') { |
| 49 | if (item.bindings?.css?.code) { |
| 50 | for (const key of Object.keys(options)) { |
| 51 | item.bindings.css.code = item.bindings.css.code.replace( |
| 52 | new RegExp(escapeRegExp(key), 'g'), |
| 53 | options[key] |
| 54 | ); |
| 55 | } |
| 56 | } |
| 57 | } |
| 58 | }); |
| 59 | }, |
| 60 | }, |
| 61 | }); |
| 62 | |
| 63 | const stripSvelteNonRootStyle = () => () => ({ |
| 64 | code: { |