The question is not what the web package wants to do with these files, but what do you want to do with these files when you require them? Do you want their contents in Javascript, do you want you to provide you with the path to the files in your assembly or something else?
If you don't need .pdn files, but Webpack is still trying to download them, you can use dynamic requirements. Dynamic requirements can do very strange things and tend to try to combine too much, so you should really avoid using them.
If you want to access files in one way, use the file loader.
In the above example, the first bootloader option will not work simply because you exclude everything in the exclude clause. You ask webpack to apply raw-loader to files matching "test", but ignore files matching "exclude", which is all in your case. Use { test: /\.pdn$/, loader: 'raw' } instead.
Ambroos
source share