Skip to content
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

Webpack 5.beta.17 DEP_WEBPACK_MAIN_TEMPLATE_HASH_FOR_CHUNK and more warnings #536

Closed
scrajesh opened this issue Jun 9, 2020 · 3 comments

Comments

@scrajesh
Copy link

scrajesh commented Jun 9, 2020

  • Operating System:
  • Node Version: v10.16.0
  • NPM Version: 6.14.3
  • webpack Version: 5.0.0-beta.17
  • mini-css-extract-plugin Version: 0.9

Expected Behavior

Get a valid Webpack build without errors/warnings

Actual Behavior

(node:50162) [DEP_WEBPACK_MAIN_TEMPLATE_HASH_FOR_CHUNK] DeprecationWarning: MainTemplate.hooks.hashForChunk is deprecated (use JavascriptModulesPlugin.getCompilationHooks().chunkHash instead)
(node:50162) [DEP_WEBPACK_COMPILATION_NORMAL_MODULE_LOADER_HOOK] DeprecationWarning: Compilation.hooks.normalModuleLoader was moved to NormalModule.getCompilationHooks(compilation).loader
(node:50162) [DEP_WEBPACK_MODULE_ID] DeprecationWarning: Module.id: Use new ChunkGraph API
(node:50162) [DEP_WEBPACK_CHUNK_GROUP_GET_MODULE_INDEX_2] DeprecationWarning: ChunkGroup.getModuleIndex2 was renamed to getModulePostOrderIndex

Code

module: {
    _name: "name-prefix",
    test: /\.css$/,
    use: [
      {
        loader: MiniCssExtractPlugin.loader,
        options: { hmr: isDevelopment, reload: isDevelopment, publicPath: "" }
      },
    ]
  }

How Do We Reproduce?

Use:
[email protected]
[email protected]

@alexander-akait
Copy link
Member

Close in favor #330

@alexander-akait
Copy link
Member

It is just deprecation, ignore them right now, webpack@5 is still in beta

@AlexandreBonneau
Copy link

Not just if this is the right place to post an update to this, but using the latest 5.75.0 Webpack version I get a similar warning message:

(node:3128437) [DEP_WEBPACK_MAIN_TEMPLATE_HASH_FOR_CHUNK] DeprecationWarning: MainTemplate.hooks.hashForChunk is deprecated (use JavascriptModulesPlugin.getCompilationHooks().chunkHash instead) (Use `node --trace-deprecation ...` to show where the warning was created)
(node:3128437) [DEP_WEBPACK_CHUNK_TEMPLATE_HASH_FOR_CHUNK] DeprecationWarning: ChunkTemplate.hooks.hashForChunk is deprecated (use JavascriptModulesPlugin.getCompilationHooks().chunkHash instead)                                                                                                                                                                                         
(node:3128437) [DEP_WEBPACK_COMPILATION_OPTIMIZE_CHUNK_ASSETS] DeprecationWarning: optimizeChunkAssets is deprecated (use Compilation.hooks.processAssets instead and use one of Compilation.PROCESS_ASSETS_STAGE_* as stage option)                                                                                                                                                        
(node:3128437) [DEP_WEBPACK_DEPRECATION_ARRAY_TO_SET_LENGTH] DeprecationWarning: chunk.files was changed from Array to Set (using Array property 'length' is deprecated)                      
(node:3128437) [DEP_WEBPACK_DEPRECATION_ARRAY_TO_SET_INDEXER] DeprecationWarning: chunk.files was changed from Array to Set (indexing Array is deprecated)

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

3 participants