Search Docs
▸ getAssetExtensionsRegExp(extensions): RegExp
extensions
RegExp
Creates RegExp from array of asset extensions.
example Usage in Webpack config:
example
import React from '@callstack/repack'; export default () => { return { module: { rules: [{ test: React.getAssetExtensionsRegExp( Repack.ASSET_EXTENSIONS.filter((ext) => ext !== 'svg') ), use: { loader: '@callstack/repack/assets-loader', } }], }, }; };
string
RegExp with extensions.
packages/repack/src/webpack/utils/assetExtensions.ts:71