HELP! how can i change chunkid where in webpackjsonp #15816
-
i wanna try change chunkid like this: (window["webpackJsonp"] = window["webpackJsonp"] || []).push([["investment/self/detail/index"],{
... changed: (window["webpackJsonp"] = window["webpackJsonp"] || []).push([["investment/self/detail/index_hash"],{
... i tried write a custom plugin but got failed compilation.hooks.optimizeChunkIds.tap('chunkIdHash', chunks => {
chunks.forEach(chunk => chunk.id = `${chunk.id}_${hash}`)
}) used webpack 4+ |
Beta Was this translation helpful? Give feedback.
Answered by
alexander-akait
May 12, 2022
Replies: 1 comment 1 reply
-
You can create custom plugin for this, here example https://github.com/webpack/webpack/blob/webpack-4/lib/NamedChunksPlugin.js |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Taoja
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can create custom plugin for this, here example https://github.com/webpack/webpack/blob/webpack-4/lib/NamedChunksPlugin.js