@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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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