My old code in the .js
file looked like this:
const withTM = require('next-transpile-modules')([
'@stripe/firestore-stripe-payments',
]) // pass the modules you would like to see transpiled
module.exports = withTM({
reactStrictMode: true,
images: {
domains: ['rb.gy', 'image.tmdb.org'],
},
})
I am passing @stripe/firestore-stripe-payments
through to be transpiled and this worked properly before.
I am recreating, and this new project has a .mjs
file instead. Both require
and module.exports
are invalid in .mjs
files.
My next.config.mjs
file looks like this currently:
import withTM from 'next-transpile-modules'
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
images: {
domains: ['image.tmdb.org', 'rb.gy']
}
};
export default nextConfig;
Does anyone have any suggestions on how I can fix this?