(state)
| 158 | * }} state |
| 159 | */ |
| 160 | export function adjust(state) { |
| 161 | const root_dir = state.rootDir?.replace(/\\/g, '/'); |
| 162 | |
| 163 | dev = state.dev; |
| 164 | runes = state.runes; |
| 165 | component_name = state.component_name ?? UNKNOWN_FILENAME; |
| 166 | |
| 167 | if (typeof root_dir === 'string' && filename.startsWith(root_dir)) { |
| 168 | // make filename relative to rootDir |
| 169 | filename = filename.replace(root_dir, '').replace(/^[/\\]/, ''); |
| 170 | } |
| 171 | |
| 172 | ignore_stack = []; |
| 173 | ignore_map.clear(); |
| 174 | cached_ignore_snapshot = null; |
| 175 | } |