We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
My project is setup with a next.config.mjs which use the ES module system instead of CommomJS.
next.config.mjs
And the project doesn't look to work with ES6:
import createNextPluginPreval from 'next-plugin-preval/config' ... Error [ERR_MODULE_NOT_FOUND]: Cannot find module
import createNextPluginPreval from 'next-plugin-preval' looks to exists but is just a [Function (anonymous)] who does nothing.
import createNextPluginPreval from 'next-plugin-preval'
[Function (anonymous)]
Maybe should you just place the config.js into the dist/ folder ? I can do a PR if you want.
config.js
dist/
The text was updated successfully, but these errors were encountered:
👋 Can confirm this is still an issue. I was able to work around it by wrapping the require in a CJS file:
// prevalWrapper.cjs const createNextPluginPreval = require('next-plugin-preval/config'); const withNextPluginPreval = createNextPluginPreval(); module.exports = withNextPluginPreval;
Then importing the wrapper:
// next.config.mjs import withNextPluginPreval from './prevalWrapper.cjs'; const nextConfig = { /* options */ }; export default withNextPluginPreval(nextConfig);
Sorry, something went wrong.
No branches or pull requests
Hi,
My project is setup with a
next.config.mjs
which use the ES module system instead of CommomJS.And the project doesn't look to work with ES6:
import createNextPluginPreval from 'next-plugin-preval'
looks to exists but is just a[Function (anonymous)]
who does nothing.Maybe should you just place the
config.js
into thedist/
folder ? I can do a PR if you want.The text was updated successfully, but these errors were encountered: