How to use the @craco/craco.addBeforeLoader function in @craco/craco

To help you get started, we’ve selected a few @craco/craco examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github commaai / cabana / craco / worker-loader.js View on Github external
overrideWebpackConfig: ({ webpackConfig, context: { env } }) => {
    const workerLoader = {
      test: /\.worker\.js/,
      use: {
        loader: "worker-loader"
      }
    };
    addBeforeLoader(webpackConfig, loaderByName("babel-loader"), workerLoader);
    return webpackConfig;
  }
};

@craco/craco

Create React App Configuration Override, an easy and comprehensible configuration layer for create-react-app.

Apache-2.0
Latest version published 1 year ago

Package Health Score

68 / 100
Full package analysis