Skip to content
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

[nextjs] fix hard crash of nextjs #270

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions packages/pigment-css-unplugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,7 @@ export const plugin = createUnplugin<PigmentOptions, true>((options) => {
code: result.code,
map: result.sourceMap,
};
} catch (e) {
const error = new Error((e as Error).message);
error.stack = (e as Error).stack;
throw error;
} catch(e) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like stated in the pr comment that I am not sure how to show this. But regarding you will see it in the Error view in your browser.

Like my example repo

image

image

It is handled. So i am not really sure what this throw aims to do since it is not handle anywhere. So today it will just crash nextjs and you have to restart the process.

}
},
};
Expand Down
Loading