strapi/docs/3.0.0-beta.x/admin-panel/custom-webpack-config.md
soupette 62148daf7a Add documentation
Signed-off-by: soupette <cyril.lpz@gmail.com>
2020-04-15 13:03:21 +02:00

479 B

Custom Webpack Config

In order to extend the usage of webpack, you can define a function that extends its config inside admin/admin.config.js, like so:

module.exports = {
  webpack: (config, webpack) => {
    // Note: we provide webpack above so you should not `require` it
    // Perform customizations to webpack config
    // Important: return the modified config
    config.plugins.push(new webpack.IgnorePlugin(/\/__tests__\//));

    return config;
  },
};