5

I'm new to webpack and I wonder if there's a way to add dynamic chunk name and path in an import. I tried doing this, but it's wrong

import(/* webpackChunkName: "${file_name}"*/ './modules/${js_path}')

or

import(/* webpackChunkName: "'+file_name+'"*/ './modules/'+js_path+'')

fyi, I can't use [request] as webpack chunck name because it's including the folder name.

I tried searching for similar problem, but not success. Please help.

TIA :)

Clover
  • 51
  • 3

0 Answers0