@vanilla-extract/next-plugin 2.3.1 → 2.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -87,7 +87,7 @@ const createVanillaExtractPlugin = (pluginOptions = {}) => {
87
87
  return (nextConfig = {}) => ({
88
88
  ...nextConfig,
89
89
  webpack(config, options) {
90
- var _resolvedNextConfig$e, _resolvedNextConfig$e2, _resolvedNextConfig$e3;
90
+ var _resolvedNextConfig$e, _resolvedNextConfig$e2;
91
91
  const {
92
92
  dir,
93
93
  dev,
@@ -100,7 +100,8 @@ const createVanillaExtractPlugin = (pluginOptions = {}) => {
100
100
  // https://github.com/vercel/next.js/pull/43916
101
101
  // on Next.js 12, findPagesDirResult is a string. on Next.js 13, findPagesDirResult is an object
102
102
  const findPagesDirResult = findPagesDir.findPagesDir(dir, (_resolvedNextConfig$e = (_resolvedNextConfig$e2 = resolvedNextConfig.experimental) === null || _resolvedNextConfig$e2 === void 0 ? void 0 : _resolvedNextConfig$e2.appDir) !== null && _resolvedNextConfig$e !== void 0 ? _resolvedNextConfig$e : false);
103
- const hasAppDir = !!((_resolvedNextConfig$e3 = resolvedNextConfig.experimental) !== null && _resolvedNextConfig$e3 !== void 0 && _resolvedNextConfig$e3.appDir) && !!(findPagesDirResult && findPagesDirResult.appDir);
103
+ // Skip nextConfig check since appDir is stable feature after Next.js 13.4
104
+ const hasAppDir = !!(findPagesDirResult && findPagesDirResult.appDir);
104
105
  const outputCss = hasAppDir ?
105
106
  // Always output css since Next.js App Router needs to collect Server CSS from React Server Components
106
107
  true :
@@ -87,7 +87,7 @@ const createVanillaExtractPlugin = (pluginOptions = {}) => {
87
87
  return (nextConfig = {}) => ({
88
88
  ...nextConfig,
89
89
  webpack(config, options) {
90
- var _resolvedNextConfig$e, _resolvedNextConfig$e2, _resolvedNextConfig$e3;
90
+ var _resolvedNextConfig$e, _resolvedNextConfig$e2;
91
91
  const {
92
92
  dir,
93
93
  dev,
@@ -100,7 +100,8 @@ const createVanillaExtractPlugin = (pluginOptions = {}) => {
100
100
  // https://github.com/vercel/next.js/pull/43916
101
101
  // on Next.js 12, findPagesDirResult is a string. on Next.js 13, findPagesDirResult is an object
102
102
  const findPagesDirResult = findPagesDir.findPagesDir(dir, (_resolvedNextConfig$e = (_resolvedNextConfig$e2 = resolvedNextConfig.experimental) === null || _resolvedNextConfig$e2 === void 0 ? void 0 : _resolvedNextConfig$e2.appDir) !== null && _resolvedNextConfig$e !== void 0 ? _resolvedNextConfig$e : false);
103
- const hasAppDir = !!((_resolvedNextConfig$e3 = resolvedNextConfig.experimental) !== null && _resolvedNextConfig$e3 !== void 0 && _resolvedNextConfig$e3.appDir) && !!(findPagesDirResult && findPagesDirResult.appDir);
103
+ // Skip nextConfig check since appDir is stable feature after Next.js 13.4
104
+ const hasAppDir = !!(findPagesDirResult && findPagesDirResult.appDir);
104
105
  const outputCss = hasAppDir ?
105
106
  // Always output css since Next.js App Router needs to collect Server CSS from React Server Components
106
107
  true :
@@ -78,7 +78,7 @@ const createVanillaExtractPlugin = (pluginOptions = {}) => {
78
78
  return (nextConfig = {}) => ({
79
79
  ...nextConfig,
80
80
  webpack(config, options) {
81
- var _resolvedNextConfig$e, _resolvedNextConfig$e2, _resolvedNextConfig$e3;
81
+ var _resolvedNextConfig$e, _resolvedNextConfig$e2;
82
82
  const {
83
83
  dir,
84
84
  dev,
@@ -91,7 +91,8 @@ const createVanillaExtractPlugin = (pluginOptions = {}) => {
91
91
  // https://github.com/vercel/next.js/pull/43916
92
92
  // on Next.js 12, findPagesDirResult is a string. on Next.js 13, findPagesDirResult is an object
93
93
  const findPagesDirResult = findPagesDir(dir, (_resolvedNextConfig$e = (_resolvedNextConfig$e2 = resolvedNextConfig.experimental) === null || _resolvedNextConfig$e2 === void 0 ? void 0 : _resolvedNextConfig$e2.appDir) !== null && _resolvedNextConfig$e !== void 0 ? _resolvedNextConfig$e : false);
94
- const hasAppDir = !!((_resolvedNextConfig$e3 = resolvedNextConfig.experimental) !== null && _resolvedNextConfig$e3 !== void 0 && _resolvedNextConfig$e3.appDir) && !!(findPagesDirResult && findPagesDirResult.appDir);
94
+ // Skip nextConfig check since appDir is stable feature after Next.js 13.4
95
+ const hasAppDir = !!(findPagesDirResult && findPagesDirResult.appDir);
95
96
  const outputCss = hasAppDir ?
96
97
  // Always output css since Next.js App Router needs to collect Server CSS from React Server Components
97
98
  true :
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vanilla-extract/next-plugin",
3
- "version": "2.3.1",
3
+ "version": "2.3.2",
4
4
  "description": "Zero-runtime Stylesheets-in-TypeScript",
5
5
  "main": "dist/vanilla-extract-next-plugin.cjs.js",
6
6
  "module": "dist/vanilla-extract-next-plugin.esm.js",