-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
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
ECMAScript Usage with NextConfig #17
Comments
// next.config.mjs
import removeImports from 'next-remove-imports'
/** @type {function(import("next").NextConfig): import("next").NextConfig}} */
const removeImportsFun = removeImports({
// test: /node_modules([\s\S]*?)\.(tsx|ts|js|mjs|jsx)$/,
// matchImports: "\\.(less|css|scss|sass|styl)$"
});
export default removeImportsFun({
webpack(config, options) {
return config
},
}); |
This gives build error |
next-remove-imports/example/esm/next.config.mjs Lines 1 to 17 in 243d848
@Pfed-prog If you provide a reproducible example, I can help you take a look. |
https://github.com/dspytdao/dspyt-homepage/tree/main/dspyt https://github.com/dspytdao/dspyt-homepage/blob/main/dspyt/next.config.js I have translated other configs to ecma as well, but the key part of the project is next config |
@Pfed-prog Not sure what happened. |
@Pfed-prog Not sure what happened. Omg, thank you so much for helping. I am trying to convert this file to ecma and it fails. |
https://nextjs.org/docs/pages/api-reference/next-config-js
CommonJS works just fine with the docs provided but the ecma script does not
The text was updated successfully, but these errors were encountered: