1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/test
Rafał Ruciński c74ad93e14 Fix a mistake in chunk name generation (#4573)
This fixes a missed bug introduced in #4510.

Because the regexp was `/-[^-]*/` and not `/-[^-]*$/`, a wrong part of the filename was being removed:

```
bad:
'foo-bar-0123456789abcdef-0123456789abcdef.js' -> 'foo-0123456789abcdef-0123456789abcdef.js'

good:
'foo-bar-0123456789abcdef-0123456789abcdef.js' -> 'foo-bar-0123456789abcdef'
```

By a stroke of luck this didn't affect the existing dynamically generated chunks. To prevent regression I've added unit tests for the function that generates the name.

Btw. in the original issue (#4433) I used the right regexp, I just used the wrong regexp in #4510.

cc @timneutkens
2018-06-09 13:46:27 +02:00
..
integration Clean up references to this.dir and this.dist everywhere (#4535) 2018-06-04 15:45:39 +02:00
isolated Clean up references to this.dir and this.dist everywhere (#4535) 2018-06-04 15:45:39 +02:00
lib Add build manifest (#4119) 2018-04-12 09:47:42 +02:00
node_modules Handle empty assetPrefix scenario properly. (#3667) 2018-02-03 17:12:01 +01:00
unit Fix a mistake in chunk name generation (#4573) 2018-06-09 13:46:27 +02:00
.babelrc Speed up tests (#4102) 2018-04-03 14:43:56 +02:00
.gitignore Universal Webpack (#3578) 2018-01-30 16:44:44 +01:00