Skip to content

Commit 491b977

Browse files
committed
fixed chunk naming
1 parent 54b2d0e commit 491b977

File tree

4 files changed

+3
-32
lines changed

4 files changed

+3
-32
lines changed

packages/incept/src/webpack/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ export default class WithWebpack {
3636
const buildPath = path.join(this._application.buildPath, 'static');
3737

3838
const chunkNamer = (fileinfo: Record<string, any>) => {
39-
const hash = fileinfo.chunk.hash;
40-
const [ name, extension ] = fileinfo.chunk.id.split('_').slice(-2);
41-
return path.join('/chunks', `${name}.${hash}.${extension}`);
39+
const name = fileinfo.chunk.name.replace(/_js$/, '').split('_').pop();
40+
const hash = fileinfo.chunk.renderedHash;
41+
return path.join('chunks', `${name}.${hash}.js`);
4242
};
4343

4444
const loadableConfig = {

packages/incept/templates/App.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

packages/incept/templates/Layout.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/incept/templates/entry.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)