How webpack4 does not package specified files, such as bootstrap.min.css

for example, I want to use bootstrap.min.css, but do not want to package it but call it directly (packing error, no solution can be found)

Mar.16,2021

put the file path to be excluded into exclude:

exclude: [
  resolve('node_modules/XXXXX/bootstrap.min.css')
]

if you already have content in exclude, you can refer to the documentation and write it in the following form:

exclude: {
  test: [/*  */],
  exclude: [
    resolve('node_modules/XXXXX/bootstrap.min.css')
  ]
}
Menu