(
presets,
{ preview, disableLoopProtectTests, disableLoopProtectPreview } = {
preview: false,
disableLoopProtectTests: false,
disableLoopProtectPreview: false
}
)
| 182 | }; |
| 183 | |
| 184 | function getBabelOptions( |
| 185 | presets, |
| 186 | { preview, disableLoopProtectTests, disableLoopProtectPreview } = { |
| 187 | preview: false, |
| 188 | disableLoopProtectTests: false, |
| 189 | disableLoopProtectPreview: false |
| 190 | } |
| 191 | ) { |
| 192 | // we protect the preview unless specifically disabled, since it evaluates as |
| 193 | // the user types and they may briefly have infinite looping code accidentally |
| 194 | if (preview && !disableLoopProtectPreview) |
| 195 | return { ...presets, plugins: ['loopProtection'] }; |
| 196 | if (!disableLoopProtectTests) |
| 197 | return { ...presets, plugins: ['testLoopProtection'] }; |
| 198 | return presets; |
| 199 | } |
| 200 | |
| 201 | const sassWorkerExecutor = new WorkerExecutor( |
| 202 | `workers/${version}/sass-compile` |
no outgoing calls
no test coverage detected