diff --git a/cashtab/config/webpack.config.js b/cashtab/config/webpack.config.js index a445c8e416..df1405fb99 100644 --- a/cashtab/config/webpack.config.js +++ b/cashtab/config/webpack.config.js @@ -354,7 +354,7 @@ module.exports = function (webpackEnv) { shouldUseSourceMap && { enforce: 'pre', exclude: /@babel(?:\/|\\{1,2})runtime/, - test: /\.(js|mjs|jsx|ts|tsx|css)$/, + test: /\.(js|mjs|cjs|jsx|ts|tsx|css)$/, loader: require.resolve('source-map-loader'), }, { @@ -415,7 +415,7 @@ module.exports = function (webpackEnv) { // Process application JS with Babel. // The preset includes JSX, Flow, TypeScript, and some ESnext features. { - test: /\.(js|mjs|jsx|ts|tsx)$/, + test: /\.(js|mjs|cjs|jsx|ts|tsx)$/, include: paths.appSrc, loader: require.resolve('babel-loader'), options: { @@ -452,7 +452,7 @@ module.exports = function (webpackEnv) { // Process any JS outside of the app with Babel. // Unlike the application JS, we only compile the standard ES features. { - test: /\.(js|mjs)$/, + test: /\.(js|mjs|cjs)$/, exclude: /@babel(?:\/|\\{1,2})runtime/, loader: require.resolve('babel-loader'), options: { @@ -572,7 +572,7 @@ module.exports = function (webpackEnv) { // by webpacks internal loaders. exclude: [ /^$/, - /\.(js|mjs|jsx|ts|tsx)$/, + /\.(js|mjs|cjs|jsx|ts|tsx)$/, /\.html$/, /\.json$/, ], @@ -758,7 +758,7 @@ module.exports = function (webpackEnv) { !disableESLintPlugin && new ESLintPlugin({ // Plugin options - extensions: ['js', 'mjs', 'jsx', 'ts', 'tsx'], + extensions: ['js', 'mjs', 'cjs', 'jsx', 'ts', 'tsx'], formatter: require.resolve( 'react-dev-utils/eslintFormatter', ),