Closed manojadams closed 1 year ago
Hello !
I couldn't repro, plz give a repo to test !
Ty
Repro:
<MaterialForms schema={{ fields: [] }} onSubmit={() => { // to do }} />
SyntaxError: Cannot use import statement outside a module
at compileFunction (
Build error occurred Error: Failed to collect page data for /fixed-deposit/basic-form at /Users/manojadams/projects/wealthy/goku/node_modules/next/dist/build/utils.js:916:15 at processTicksAndRejections (node:internal/process/task_queues:96:5) { type: 'Error' } `
- If I do not use mui-tel-input component in the library, it works fine.
- Not able to figure out what is the issue.
Maybe try this in your next.config.js
file:
const nextConfig = {
transpilePackages: ['@manojadams/metaforms-mui'],
}
module.exports = nextConfig
Transpiling the mui-tel-input
itself worked for me:
const nextConfig = {
transpilePackages: ['mui-tel-input'],
}
module.exports = nextConfig
Transpiling the
mui-tel-input
itself worked for me:const nextConfig = { transpilePackages: ['mui-tel-input'], } module.exports = nextConfig
Hi. I've would not call this a proper solution. Looks like there is something fishy with a build. It prolly thinks it's ESM but it's CJS. Gonna check if there is a way to properly fix that.
This is the reason why i don't like vite
for packages, with tsup
you can setup this part easily...
Getting following issue while trying to use this library: