Mini-css-extract-plugin: What's the difference between filename and chunkFilename options

Created on 13 Mar 2018  路  3Comments  路  Source: webpack-contrib/mini-css-extract-plugin

As the title, it seems sometimes one is used, sometimes the other. Could someone explain?

Most helpful comment

Async Chunk => chunkFilename e.g import(/* webpackChunkName: "foo" */ './file.css') => foo.css

Sync Chunk (e.g an Entrypoint) => filename => e.g import styles from './file.css' (in entry.js) => entry.css

Code Splitting
import()

All 3 comments

Async Chunk => chunkFilename e.g import(/* webpackChunkName: "foo" */ './file.css') => foo.css

Sync Chunk (e.g an Entrypoint) => filename => e.g import styles from './file.css' (in entry.js) => entry.css

Code Splitting
import()

It's the Amazing Lazyload, whenever you find chunk you automatically use it when you want to import it dynamically.

Finally, I had make a good understood of the difference between them with this awesome answer!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

skrobek picture skrobek  路  4Comments

TheHolyWaffle picture TheHolyWaffle  路  4Comments

stavalfi picture stavalfi  路  4Comments

septs picture septs  路  3Comments

thescientist13 picture thescientist13  路  3Comments