build failed when adding docx. import issue
dhallX opened this issue · comments
I saw this issue was a old issue but none of the change helped...
I have a problem with my next.is @14.0. 3 app when i install and use the package in localhost the package works! however the moment i try to build the app i get this:
I am sure this has to do with a webpack setup but i don't know what it should be so that the proper module are imported.
below is my config file
`const nextConfig = {
reactStrictMode: false, // Enable React strict mode for improved error handling
swcMinify: true, // Enable SWC minification for improved performance
experimental: {
optimizePackageImports: [
'react-big-calendar',
'@mui/lab',
'@mui/x-date-pickers',
'material-react-table',
'react-calendar-timeline',
'react-hook-form',
'@emotion/react',
'@emotion/styled',
'aws-amplify',
'uuidv4',
'html2pdf.js',
'dayjs',
],
},
images: {
remotePatterns: [
],
},
};
module.exports = nextConfig;`