Open fabien opened 3 years ago
I'm using https://github.com/martpie/next-transpile-modules within a mono-repo for a smooth dev experience. Unfortunately, it is not compatible with next-plugin-preval.
next-plugin-preval
In theory next-transpile-modules would run before next-plugin-preval and it should all just work, but this is not the case. I need them in reverse order to actually have a working app at all.
next-transpile-modules
Would be awesome if it would work transparently.
const withPlugins = require('next-compose-plugins'); const transpileModules = require('next-transpile-modules'); const withTranslations = require('next-translate'); const withPreval = require('next-plugin-preval/config')(); const withBundleAnalyzer = require('@next/bundle-analyzer')({ enabled: process.env.ANALYZE === 'true', }); const coreModules = []; const nextConfig = {}; const withTM = transpileModules( ['lodash-es', ...coreModules], { resolveSymlinks: true } ); return withPlugins( [ withPreval(), // first withTM, // second withTranslations, withBundleAnalyzer ], nextConfig );
I'm using https://github.com/martpie/next-transpile-modules within a mono-repo for a smooth dev experience. Unfortunately, it is not compatible with
next-plugin-preval
.In theory
next-transpile-modules
would run beforenext-plugin-preval
and it should all just work, but this is not the case. I need them in reverse order to actually have a working app at all.Would be awesome if it would work transparently.