Commit b255ad5
authored
fix(v2/core): Make
Makes the v2 `moduleMetadata` code snippet ES5-compliant by replacing the `Object.assign` merge strategy of the module with a pure ES5 merge strategy: iterating over the object property of both objects to merge to the final object.
Obviously, this increases the bundle size footprint but I think we need to prioritize correctness.
Also took the opportunity to minify the code and further isolate the `var`-declared variables by wrapping the code in an IIFE. Adjusted to the tests to also use `toMatchSnapshot`, since the inline snapshots would no longer be readable.moduleMetadata injection code ES5-compliant (#773)1 parent 01404ae commit b255ad5
File tree
3 files changed
+10
-70
lines changed- packages/bundler-plugin-core
- src
- test
- __snapshots__
3 files changed
+10
-70
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
368 | 349 | | |
369 | 350 | | |
370 | 351 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
| 222 | + | |
246 | 223 | | |
247 | 224 | | |
248 | 225 | | |
| |||
254 | 231 | | |
255 | 232 | | |
256 | 233 | | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
| 234 | + | |
281 | 235 | | |
282 | 236 | | |
0 commit comments