Webpack 2: How to exclude all node_modules except for

后端 未结 4 1937
闹比i
闹比i 2021-01-18 01:01

I need to have babel run on /node_modules/identicons/ However I still want to exclude all other packages.

Reason is the identicons package

4条回答
  •  醉酒成梦
    2021-01-18 01:30

    You could exclude everything from node_modules that is not identicons:

    exclude: /node_modules\/(?!identicons$)/
    

提交回复
热议问题