webpackChunkName not being honored in CRA application

Viewed 130

I'm doing a dynamic import as follows:

import(
    /* webpackChunkName: Bar */ 
    '@aspnet/signalr'
).then(({HubConnectionBuilder, HttpTransportType}) => {
    ...
})

The imported library does get chunked separately, but the chunk in the production build isn't named per the magic comment... Any idea why this could be? This is a non-ejected CRA app using v3.4.3 of react-scripts.

NB: I've opened an issue on the create-react-app repo here

0 Answers
Related