Sorry for the opened issue, if it possible, can you delete #10 and #11. Look like the issue doesn't come from webpack 5, but somewhere else.
Reproduction
Creating a new Next.js project with webpack 5 enable, twind shim version, a cusom _app.js and a custom _document.js (same as the example in README). This is the setting in next.config.js:
module.exports = { future: { webpack5: true, } };
Changing the twind config file or any thrown errors (e.g. returning multiple components) , upon fixing will trigger this error from twind
Error: Error: [LATE_SETUP_CALL] {} at withTwindDocument (node_modules\@twind\next\document\document.cjs:38:27) at withTwindDocument (node_modules\@twind\next\shim\document\document.cjs:32:52)
Sorry for the opened issue, if it possible, can you delete #10 and #11. Look like the issue doesn't come from webpack 5, but somewhere else.
Reproduction
Creating a new Next.js project with webpack 5 enable, twind shim version, a cusom _app.js and a custom _document.js (same as the example in README). This is the setting in next.config.js:
module.exports = { future: { webpack5: true, } };
Changing the twind config file or any thrown errors (e.g. returning multiple components) , upon fixing will trigger this error from twind
Error: Error: [LATE_SETUP_CALL] {} at withTwindDocument (node_modules\@twind\next\document\document.cjs:38:27) at withTwindDocument (node_modules\@twind\next\shim\document\document.cjs:32:52)