Is there a way to ignore a file type with Webpack? -


in creating art website, have intermediate files want keep in "media" folder.

but webpack starts complaining not know files.

is there easy way say, don't worry files .pdn extension?

i tried these options in webpack.config.js, , did not help:

  1. { test: /\.pdn?$/, loader: 'raw', exclude: /.*/}
  2. { test: /\.pdn?$/, exclude: /.*/}

you add ignore-loader plugin , match files it.

example (in webpack.config.js)

this ignore .css files.

module.exports = {   // ... other configurations ...   module: {     loaders: [       { test: /\.css$/, loader: 'ignore-loader' }     ]   } }; 

i needed since requiring node_modules imported multiple font formats, wanted woff or woff2 formats.

my solution:

config = {   // ... config ...   module: [     { test: /(\.woff|\.woff2)$/, loader: 'url?name=font/[name].[ext]&limit=10240&mimetype=application/font-woff' },     { test: /\.ttf$/, loader: 'ignore-loader' },     { test: /\.eot$/, loader: 'ignore-loader' }   ] }