@vanilla-extract/vite-plugin 3.1.1 → 3.1.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.
|
@@ -33,8 +33,10 @@ var outdent__default = /*#__PURE__*/_interopDefault(outdent);
|
|
|
33
33
|
// Mostly copied from vite's implementation
|
|
34
34
|
// https://github.com/vitejs/vite/blob/efec70f816b80e55b64255b32a5f120e1cf4e4be/packages/vite/src/node/plugins/css.ts
|
|
35
35
|
const resolvePostcssConfig = async config => {
|
|
36
|
+
var _config$css;
|
|
37
|
+
|
|
36
38
|
// inline postcss config via vite config
|
|
37
|
-
const inlineOptions = config.css
|
|
39
|
+
const inlineOptions = (_config$css = config.css) === null || _config$css === void 0 ? void 0 : _config$css.postcss;
|
|
38
40
|
const inlineOptionsIsString = typeof inlineOptions === 'string';
|
|
39
41
|
|
|
40
42
|
if (inlineOptions && !inlineOptionsIsString) {
|
|
@@ -157,7 +159,7 @@ function vanillaExtractPlugin({
|
|
|
157
159
|
if (typeof ssrParam === 'boolean') {
|
|
158
160
|
ssr = ssrParam;
|
|
159
161
|
} else {
|
|
160
|
-
ssr = ssrParam
|
|
162
|
+
ssr = ssrParam === null || ssrParam === void 0 ? void 0 : ssrParam.ssr;
|
|
161
163
|
}
|
|
162
164
|
|
|
163
165
|
const index = id.indexOf('?');
|
|
@@ -190,7 +192,7 @@ function vanillaExtractPlugin({
|
|
|
190
192
|
return integration.processVanillaFile({
|
|
191
193
|
source,
|
|
192
194
|
filePath: validId,
|
|
193
|
-
identOption: identifiers
|
|
195
|
+
identOption: identifiers !== null && identifiers !== void 0 ? identifiers : config.mode === 'production' ? 'short' : 'debug',
|
|
194
196
|
serializeVirtualCssPath: async ({
|
|
195
197
|
fileScope,
|
|
196
198
|
source
|
|
@@ -33,8 +33,10 @@ var outdent__default = /*#__PURE__*/_interopDefault(outdent);
|
|
|
33
33
|
// Mostly copied from vite's implementation
|
|
34
34
|
// https://github.com/vitejs/vite/blob/efec70f816b80e55b64255b32a5f120e1cf4e4be/packages/vite/src/node/plugins/css.ts
|
|
35
35
|
const resolvePostcssConfig = async config => {
|
|
36
|
+
var _config$css;
|
|
37
|
+
|
|
36
38
|
// inline postcss config via vite config
|
|
37
|
-
const inlineOptions = config.css
|
|
39
|
+
const inlineOptions = (_config$css = config.css) === null || _config$css === void 0 ? void 0 : _config$css.postcss;
|
|
38
40
|
const inlineOptionsIsString = typeof inlineOptions === 'string';
|
|
39
41
|
|
|
40
42
|
if (inlineOptions && !inlineOptionsIsString) {
|
|
@@ -157,7 +159,7 @@ function vanillaExtractPlugin({
|
|
|
157
159
|
if (typeof ssrParam === 'boolean') {
|
|
158
160
|
ssr = ssrParam;
|
|
159
161
|
} else {
|
|
160
|
-
ssr = ssrParam
|
|
162
|
+
ssr = ssrParam === null || ssrParam === void 0 ? void 0 : ssrParam.ssr;
|
|
161
163
|
}
|
|
162
164
|
|
|
163
165
|
const index = id.indexOf('?');
|
|
@@ -190,7 +192,7 @@ function vanillaExtractPlugin({
|
|
|
190
192
|
return integration.processVanillaFile({
|
|
191
193
|
source,
|
|
192
194
|
filePath: validId,
|
|
193
|
-
identOption: identifiers
|
|
195
|
+
identOption: identifiers !== null && identifiers !== void 0 ? identifiers : config.mode === 'production' ? 'short' : 'debug',
|
|
194
196
|
serializeVirtualCssPath: async ({
|
|
195
197
|
fileScope,
|
|
196
198
|
source
|
|
@@ -6,8 +6,10 @@ import { getPackageInfo, parseFileScope, cssFileFilter, addFileScope, compile, p
|
|
|
6
6
|
// Mostly copied from vite's implementation
|
|
7
7
|
// https://github.com/vitejs/vite/blob/efec70f816b80e55b64255b32a5f120e1cf4e4be/packages/vite/src/node/plugins/css.ts
|
|
8
8
|
const resolvePostcssConfig = async config => {
|
|
9
|
+
var _config$css;
|
|
10
|
+
|
|
9
11
|
// inline postcss config via vite config
|
|
10
|
-
const inlineOptions = config.css
|
|
12
|
+
const inlineOptions = (_config$css = config.css) === null || _config$css === void 0 ? void 0 : _config$css.postcss;
|
|
11
13
|
const inlineOptionsIsString = typeof inlineOptions === 'string';
|
|
12
14
|
|
|
13
15
|
if (inlineOptions && !inlineOptionsIsString) {
|
|
@@ -130,7 +132,7 @@ function vanillaExtractPlugin({
|
|
|
130
132
|
if (typeof ssrParam === 'boolean') {
|
|
131
133
|
ssr = ssrParam;
|
|
132
134
|
} else {
|
|
133
|
-
ssr = ssrParam
|
|
135
|
+
ssr = ssrParam === null || ssrParam === void 0 ? void 0 : ssrParam.ssr;
|
|
134
136
|
}
|
|
135
137
|
|
|
136
138
|
const index = id.indexOf('?');
|
|
@@ -163,7 +165,7 @@ function vanillaExtractPlugin({
|
|
|
163
165
|
return processVanillaFile({
|
|
164
166
|
source,
|
|
165
167
|
filePath: validId,
|
|
166
|
-
identOption: identifiers
|
|
168
|
+
identOption: identifiers !== null && identifiers !== void 0 ? identifiers : config.mode === 'production' ? 'short' : 'debug',
|
|
167
169
|
serializeVirtualCssPath: async ({
|
|
168
170
|
fileScope,
|
|
169
171
|
source
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vanilla-extract/vite-plugin",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"description": "Zero-runtime Stylesheets-in-TypeScript",
|
|
5
5
|
"main": "dist/vanilla-extract-vite-plugin.cjs.js",
|
|
6
6
|
"module": "dist/vanilla-extract-vite-plugin.esm.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"author": "SEEK",
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@vanilla-extract/integration": "^2.0.
|
|
18
|
+
"@vanilla-extract/integration": "^2.0.1",
|
|
19
19
|
"outdent": "^0.8.0",
|
|
20
20
|
"postcss": "^8.3.6",
|
|
21
21
|
"postcss-load-config": "^3.1.0"
|