| 202 | `workers/${version}/sass-compile` |
| 203 | ); |
| 204 | async function transformSASS(documentElement) { |
| 205 | // we only teach scss syntax, not sass. Also the compiler does not seem to be |
| 206 | // able to deal with sass. |
| 207 | const styleTags = documentElement.querySelectorAll( |
| 208 | 'style[type~="text/scss"]' |
| 209 | ); |
| 210 | |
| 211 | await Promise.all( |
| 212 | [].map.call(styleTags, async style => { |
| 213 | style.type = 'text/css'; |
| 214 | style.innerHTML = await sassWorkerExecutor.execute(style.innerHTML, 5000) |
| 215 | .done; |
| 216 | }) |
| 217 | ); |
| 218 | } |
| 219 | |
| 220 | async function transformScript(documentElement, { useModules }) { |
| 221 | await loadBabel(); |