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

Fix error when intializing next plugin #1148

Merged
merged 2 commits into from
Jul 25, 2023
Merged

Fix error when intializing next plugin #1148

merged 2 commits into from
Jul 25, 2023

Conversation

mattcompiles
Copy link
Contributor

Fixes #1147

@changeset-bot
Copy link

changeset-bot bot commented Jul 25, 2023

🦋 Changeset detected

Latest commit: f205871

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@vanilla-extract/next-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR


import type webpack from 'webpack';
import type { NextConfig } from 'next/types';
import type { WebpackConfigContext } from 'next/dist/server/config-shared';

// Next.js' built-in mini-css-extract-plugin has a very terrible type definition, let's just use any
const NextMiniCssExtractPlugin: any =
// @ts-expect-error -- Next.js' precompilation does add "__esModule: true", but doesn't add an actual default exports
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was wrong apparently. 🤷

@mattcompiles mattcompiles enabled auto-merge (squash) July 25, 2023 06:37
@mattcompiles mattcompiles merged commit b279bb5 into master Jul 25, 2023
9 checks passed
@mattcompiles mattcompiles deleted the fix-next branch July 25, 2023 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeError: Right-hand side of 'instanceof' is not an object with vanilla-extract/next-plugin@2.2.0
2 participants