Skip to content

moduleFilename doesn't work when i using runtimeChunk #523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
frhandlee opened this issue Apr 7, 2020 · 4 comments
Closed

moduleFilename doesn't work when i using runtimeChunk #523

frhandlee opened this issue Apr 7, 2020 · 4 comments

Comments

@frhandlee
Copy link

frhandlee commented Apr 7, 2020

  • Operating System: macos
  • Node Version: 10.15.3
  • NPM Version: 6.10.0
  • webpack Version:4.42.1
  • mini-css-extract-plugin Version: 0.9.0

Expected Behavior

moduleFilename can work

Actual Behavior

moduleFilename can't work when i open runtimeChunk

Code

    runtimeChunk: {
      name: 'common/js/mainfest'
    }

How Do We Reproduce?

it's will certainly appear when open runtimeChunk,and it's ok in 'extract-text-webpack-plugin'

@alexander-akait
Copy link
Member

runtimeChunk and moduleFilename is difference, please create reproducible test repo

@Jessidhia
Copy link
Contributor

By using debug console.errors, I can confirm that the moduleFilename function doesn't get invoked at all: the chunkFilename function is invoked instead. However, making chunkFilename a function causes the error in #417 instead:

ERROR in chunk runtime [entry]
Cannot read property 'replace' of undefined

ERROR in chunk runtime [entry]
[name].[contenthash].js
Path variable [contenthash] not implemented in this context: [name].[contenthash].js

@wangxianfa
Copy link

runtimeChunk and moduleFilename is difference, please create reproducible test repo

i had the same issue. when add runtimeChunk in webpack.optimization,moduleFilename cant work. remove runtimeChunk, moduleFilename work again.

@alexander-akait
Copy link
Member

moduleFilename was removed in favor filename/chunkFilename, if you will have problems with new version (1.0.0, release will be today), please open a new issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants