@@ -169,7 +169,7 @@ exports[`plugin aggressive import should work with destructuration 1`] = `
169
169
chunkName ({
170
170
foo
171
171
}) {
172
- return \`\${foo }\` .replace(/[^a-zA-Z0-9_!§$()=\\\\ -^°]+/g, \\ "-\\ ");
172
+ return \`\${foo }\` .replace(/[^a-zA-Z0-9_!§$()=\\\\ -^°]+/g, \\ "-\\ ").replace(/^-|-$/g, \\ " \\ ") ;
173
173
},
174
174
175
175
isReady(props) {
@@ -212,7 +212,7 @@ exports[`plugin aggressive import should work with destructuration 1`] = `
212
212
exports [` plugin aggressive import with "webpackChunkName" should replace it 1` ] = `
213
213
"loadable({
214
214
chunkName (props ) {
215
- return \`\${props.foo }\` .replace(/[^a-zA-Z0-9_!§$()=\\\\ -^°]+/g, \\ "-\\ ");
215
+ return \`\${props.foo }\` .replace(/[^a-zA-Z0-9_!§$()=\\\\ -^°]+/g, \\ "-\\ ").replace(/^-|-$/g, \\ " \\ ") ;
216
216
},
217
217
218
218
isReady(props) {
@@ -251,7 +251,7 @@ exports[`plugin aggressive import with "webpackChunkName" should replace it 1`]
251
251
exports [` plugin aggressive import without "webpackChunkName" should support complex request 1` ] = `
252
252
"loadable({
253
253
chunkName (props ) {
254
- return \`dir-\${props.foo }- test \` .replace(/[^a-zA-Z0-9_!§$()=\\\\ -^°]+/g, \\ "-\\ ");
254
+ return \`dir-\${props.foo }- test \` .replace(/[^a-zA-Z0-9_!§$()=\\\\ -^°]+/g, \\ "-\\ ").replace(/^-|-$/g, \\ " \\ ") ;
255
255
},
256
256
257
257
isReady(props) {
@@ -292,7 +292,7 @@ exports[`plugin aggressive import without "webpackChunkName" should support dest
292
292
chunkName ({
293
293
foo
294
294
}) {
295
- return \`dir-\${foo }- test \` .replace(/[^a-zA-Z0-9_!§$()=\\\\ -^°]+/g, \\ "-\\ ");
295
+ return \`dir-\${foo }- test \` .replace(/[^a-zA-Z0-9_!§$()=\\\\ -^°]+/g, \\ "-\\ ").replace(/^-|-$/g, \\ " \\ ") ;
296
296
},
297
297
298
298
isReady(props) {
@@ -335,7 +335,7 @@ exports[`plugin aggressive import without "webpackChunkName" should support dest
335
335
exports [` plugin aggressive import without "webpackChunkName" should support simple request 1` ] = `
336
336
"loadable({
337
337
chunkName (props ) {
338
- return \`\${props.foo }\` .replace(/[^a-zA-Z0-9_!§$()=\\\\ -^°]+/g, \\ "-\\ ");
338
+ return \`\${props.foo }\` .replace(/[^a-zA-Z0-9_!§$()=\\\\ -^°]+/g, \\ "-\\ ").replace(/^-|-$/g, \\ " \\ ") ;
339
339
},
340
340
341
341
isReady(props) {
@@ -488,10 +488,10 @@ exports[`plugin simple import should transform path into "chunk-friendly" name 1
488
488
} );"
489
489
` ;
490
490
491
- exports [` plugin simple import should work with custom name 1` ] = `
491
+ exports [` plugin simple import should work with * in name 1` ] = `
492
492
"loadable({
493
493
chunkName () {
494
- return \`foo\`.replace(/[^a -zA -Z0 -9_ !§$ ()= \\\\- ^ °]+/g , \\"-\\");
494
+ return \`foo\`.replace(/[^a -zA -Z0 -9_ !§$ ()= \\\\- ^ °]+/g , \\"-\\").replace(/^-|- $ / g , \\"\\") ;
495
495
},
496
496
497
497
isReady (props ) {
@@ -530,7 +530,7 @@ exports[`plugin simple import should work with custom name 1`] = `
530
530
exports [` plugin simple import should work with template literal 1` ] = `
531
531
"loadable({
532
532
chunkName () {
533
- return \`ModA\`.replace(/[^a -zA -Z0 -9_ !§$ ()= \\\\- ^ °]+/g , \\"-\\");
533
+ return \`ModA\`.replace(/[^a -zA -Z0 -9_ !§$ ()= \\\\- ^ °]+/g , \\"-\\").replace(/^-|- $ / g , \\"\\") ;
534
534
},
535
535
536
536
isReady (props ) {
0 commit comments