@vanilla-extract/vite-plugin
Advanced tools
Comparing version 0.0.0-inline-prototype-202342012537 to 0.0.0-proxy-pr-1252-20240125041511
@@ -6,3 +6,2 @@ 'use strict'; | ||
var path = require('path'); | ||
var vite = require('vite'); | ||
var outdent = require('outdent'); | ||
@@ -13,20 +12,2 @@ var integration = require('@vanilla-extract/integration'); | ||
function _interopNamespace(e) { | ||
if (e && e.__esModule) return e; | ||
var n = Object.create(null); | ||
if (e) { | ||
Object.keys(e).forEach(function (k) { | ||
if (k !== 'default') { | ||
var d = Object.getOwnPropertyDescriptor(e, k); | ||
Object.defineProperty(n, k, d.get ? d : { | ||
enumerable: true, | ||
get: function () { return e[k]; } | ||
}); | ||
} | ||
}); | ||
} | ||
n["default"] = e; | ||
return Object.freeze(n); | ||
} | ||
var path__default = /*#__PURE__*/_interopDefault(path); | ||
@@ -54,6 +35,5 @@ var outdent__default = /*#__PURE__*/_interopDefault(outdent); | ||
const searchPath = typeof inlineOptions === 'string' ? inlineOptions : config.root; | ||
const postCssConfig = await (await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('postcss-load-config')); })).default({}, searchPath); | ||
const postCssConfig = await (await import('postcss-load-config')).default({}, searchPath); | ||
return { | ||
options: postCssConfig.options, | ||
// @ts-expect-error - The postcssrc options don't agree with real postcss, but it should be ok | ||
plugins: postCssConfig.plugins | ||
@@ -81,2 +61,4 @@ }; | ||
let postCssConfig; | ||
// We lazily load this utility from Vite | ||
let normalizePath; | ||
const cssMap = new Map(); | ||
@@ -86,3 +68,3 @@ const hasEmitCssOverride = typeof emitCssInSsr === 'boolean'; | ||
let packageName; | ||
const getAbsoluteVirtualFileId = source => vite.normalizePath(path__default["default"].join(config.root, source)); | ||
const getAbsoluteVirtualFileId = source => normalizePath(path__default["default"].join(config.root, source)); | ||
return { | ||
@@ -108,6 +90,7 @@ name: 'vanilla-extract', | ||
packageName = integration.getPackageInfo(config.root).name; | ||
normalizePath = (await import('vite')).normalizePath; | ||
if (config.command === 'serve') { | ||
postCssConfig = await resolvePostcssConfig(config); | ||
} | ||
if (!hasEmitCssOverride && config.plugins.some(plugin => ['astro:build', 'solid-start-server', 'vite-plugin-qwik', 'vite-plugin-svelte'].includes(plugin.name))) { | ||
if (!hasEmitCssOverride && config.plugins.some(plugin => ['astro:build', 'remix', 'solid-start-server', 'vite-plugin-qwik', 'vite-plugin-svelte'].includes(plugin.name))) { | ||
resolvedEmitCssInSsr = true; | ||
@@ -180,3 +163,3 @@ } | ||
source: code, | ||
filePath: vite.normalizePath(validId), | ||
filePath: normalizePath(validId), | ||
rootPath: config.root, | ||
@@ -199,3 +182,3 @@ packageName, | ||
// If it's a `build --watch`, it needs to watch everything. | ||
if (config.command === 'build' || file !== validId) { | ||
if (config.command === 'build' || normalizePath(file) !== validId) { | ||
this.addWatchFile(file); | ||
@@ -216,3 +199,3 @@ } | ||
if (postCssConfig) { | ||
const postCssResult = await (await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('postcss')); })).default(postCssConfig.plugins).process(source, { | ||
const postCssResult = await (await import('postcss')).default(postCssConfig.plugins).process(source, { | ||
...postCssConfig.options, | ||
@@ -224,3 +207,3 @@ from: undefined, | ||
} | ||
if (server && cssMap.has(absoluteId) && cssMap.get(absoluteId) !== source) { | ||
if (server && cssMap.has(absoluteId) && cssMap.get(absoluteId) !== cssSource) { | ||
const { | ||
@@ -227,0 +210,0 @@ moduleGraph |
@@ -6,3 +6,2 @@ 'use strict'; | ||
var path = require('path'); | ||
var vite = require('vite'); | ||
var outdent = require('outdent'); | ||
@@ -13,20 +12,2 @@ var integration = require('@vanilla-extract/integration'); | ||
function _interopNamespace(e) { | ||
if (e && e.__esModule) return e; | ||
var n = Object.create(null); | ||
if (e) { | ||
Object.keys(e).forEach(function (k) { | ||
if (k !== 'default') { | ||
var d = Object.getOwnPropertyDescriptor(e, k); | ||
Object.defineProperty(n, k, d.get ? d : { | ||
enumerable: true, | ||
get: function () { return e[k]; } | ||
}); | ||
} | ||
}); | ||
} | ||
n["default"] = e; | ||
return Object.freeze(n); | ||
} | ||
var path__default = /*#__PURE__*/_interopDefault(path); | ||
@@ -54,6 +35,5 @@ var outdent__default = /*#__PURE__*/_interopDefault(outdent); | ||
const searchPath = typeof inlineOptions === 'string' ? inlineOptions : config.root; | ||
const postCssConfig = await (await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('postcss-load-config')); })).default({}, searchPath); | ||
const postCssConfig = await (await import('postcss-load-config')).default({}, searchPath); | ||
return { | ||
options: postCssConfig.options, | ||
// @ts-expect-error - The postcssrc options don't agree with real postcss, but it should be ok | ||
plugins: postCssConfig.plugins | ||
@@ -81,2 +61,4 @@ }; | ||
let postCssConfig; | ||
// We lazily load this utility from Vite | ||
let normalizePath; | ||
const cssMap = new Map(); | ||
@@ -86,3 +68,3 @@ const hasEmitCssOverride = typeof emitCssInSsr === 'boolean'; | ||
let packageName; | ||
const getAbsoluteVirtualFileId = source => vite.normalizePath(path__default["default"].join(config.root, source)); | ||
const getAbsoluteVirtualFileId = source => normalizePath(path__default["default"].join(config.root, source)); | ||
return { | ||
@@ -108,6 +90,7 @@ name: 'vanilla-extract', | ||
packageName = integration.getPackageInfo(config.root).name; | ||
normalizePath = (await import('vite')).normalizePath; | ||
if (config.command === 'serve') { | ||
postCssConfig = await resolvePostcssConfig(config); | ||
} | ||
if (!hasEmitCssOverride && config.plugins.some(plugin => ['astro:build', 'solid-start-server', 'vite-plugin-qwik', 'vite-plugin-svelte'].includes(plugin.name))) { | ||
if (!hasEmitCssOverride && config.plugins.some(plugin => ['astro:build', 'remix', 'solid-start-server', 'vite-plugin-qwik', 'vite-plugin-svelte'].includes(plugin.name))) { | ||
resolvedEmitCssInSsr = true; | ||
@@ -180,3 +163,3 @@ } | ||
source: code, | ||
filePath: vite.normalizePath(validId), | ||
filePath: normalizePath(validId), | ||
rootPath: config.root, | ||
@@ -199,3 +182,3 @@ packageName, | ||
// If it's a `build --watch`, it needs to watch everything. | ||
if (config.command === 'build' || file !== validId) { | ||
if (config.command === 'build' || normalizePath(file) !== validId) { | ||
this.addWatchFile(file); | ||
@@ -216,3 +199,3 @@ } | ||
if (postCssConfig) { | ||
const postCssResult = await (await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('postcss')); })).default(postCssConfig.plugins).process(source, { | ||
const postCssResult = await (await import('postcss')).default(postCssConfig.plugins).process(source, { | ||
...postCssConfig.options, | ||
@@ -224,3 +207,3 @@ from: undefined, | ||
} | ||
if (server && cssMap.has(absoluteId) && cssMap.get(absoluteId) !== source) { | ||
if (server && cssMap.has(absoluteId) && cssMap.get(absoluteId) !== cssSource) { | ||
const { | ||
@@ -227,0 +210,0 @@ moduleGraph |
import path from 'path'; | ||
import { normalizePath } from 'vite'; | ||
import outdent from 'outdent'; | ||
@@ -28,3 +27,2 @@ import { getPackageInfo, cssFileFilter, transform, compile, processVanillaFile } from '@vanilla-extract/integration'; | ||
options: postCssConfig.options, | ||
// @ts-expect-error - The postcssrc options don't agree with real postcss, but it should be ok | ||
plugins: postCssConfig.plugins | ||
@@ -52,2 +50,4 @@ }; | ||
let postCssConfig; | ||
// We lazily load this utility from Vite | ||
let normalizePath; | ||
const cssMap = new Map(); | ||
@@ -78,6 +78,7 @@ const hasEmitCssOverride = typeof emitCssInSsr === 'boolean'; | ||
packageName = getPackageInfo(config.root).name; | ||
normalizePath = (await import('vite')).normalizePath; | ||
if (config.command === 'serve') { | ||
postCssConfig = await resolvePostcssConfig(config); | ||
} | ||
if (!hasEmitCssOverride && config.plugins.some(plugin => ['astro:build', 'solid-start-server', 'vite-plugin-qwik', 'vite-plugin-svelte'].includes(plugin.name))) { | ||
if (!hasEmitCssOverride && config.plugins.some(plugin => ['astro:build', 'remix', 'solid-start-server', 'vite-plugin-qwik', 'vite-plugin-svelte'].includes(plugin.name))) { | ||
resolvedEmitCssInSsr = true; | ||
@@ -168,3 +169,3 @@ } | ||
// If it's a `build --watch`, it needs to watch everything. | ||
if (config.command === 'build' || file !== validId) { | ||
if (config.command === 'build' || normalizePath(file) !== validId) { | ||
this.addWatchFile(file); | ||
@@ -192,3 +193,3 @@ } | ||
} | ||
if (server && cssMap.has(absoluteId) && cssMap.get(absoluteId) !== source) { | ||
if (server && cssMap.has(absoluteId) && cssMap.get(absoluteId) !== cssSource) { | ||
const { | ||
@@ -195,0 +196,0 @@ moduleGraph |
{ | ||
"name": "@vanilla-extract/vite-plugin", | ||
"version": "0.0.0-inline-prototype-202342012537", | ||
"version": "0.0.0-proxy-pr-1252-20240125041511", | ||
"description": "Zero-runtime Stylesheets-in-TypeScript", | ||
@@ -18,6 +18,6 @@ "main": "dist/vanilla-extract-vite-plugin.cjs.js", | ||
"dependencies": { | ||
"@vanilla-extract/integration": "^0.0.0-inline-prototype-202342012537", | ||
"@vanilla-extract/integration": "0.0.0-proxy-pr-1252-20240125041511", | ||
"outdent": "^0.8.0", | ||
"postcss": "^8.3.6", | ||
"postcss-load-config": "^3.1.0" | ||
"postcss-load-config": "^4.0.1" | ||
}, | ||
@@ -28,4 +28,4 @@ "devDependencies": { | ||
"peerDependencies": { | ||
"vite": "^2.2.3 || ^3.0.0 || ^4.0.3" | ||
"vite": "^2.2.3 || ^3.0.0 || ^4.0.3 || ^5.0.0" | ||
} | ||
} |
9
29110
670
+ Added@esbuild/aix-ppc64@0.19.12(transitive)
+ Added@esbuild/android-arm@0.19.12(transitive)
+ Added@esbuild/android-arm64@0.19.12(transitive)
+ Added@esbuild/android-x64@0.19.12(transitive)
+ Added@esbuild/darwin-arm64@0.19.12(transitive)
+ Added@esbuild/darwin-x64@0.19.12(transitive)
+ Added@esbuild/freebsd-arm64@0.19.12(transitive)
+ Added@esbuild/freebsd-x64@0.19.12(transitive)
+ Added@esbuild/linux-arm@0.19.12(transitive)
+ Added@esbuild/linux-arm64@0.19.12(transitive)
+ Added@esbuild/linux-ia32@0.19.12(transitive)
+ Added@esbuild/linux-loong64@0.19.12(transitive)
+ Added@esbuild/linux-mips64el@0.19.12(transitive)
+ Added@esbuild/linux-ppc64@0.19.12(transitive)
+ Added@esbuild/linux-riscv64@0.19.12(transitive)
+ Added@esbuild/linux-s390x@0.19.12(transitive)
+ Added@esbuild/linux-x64@0.19.12(transitive)
+ Added@esbuild/netbsd-x64@0.19.12(transitive)
+ Added@esbuild/openbsd-x64@0.19.12(transitive)
+ Added@esbuild/sunos-x64@0.19.12(transitive)
+ Added@esbuild/win32-arm64@0.19.12(transitive)
+ Added@esbuild/win32-ia32@0.19.12(transitive)
+ Added@esbuild/win32-x64@0.19.12(transitive)
+ Added@vanilla-extract/integration@0.0.0-proxy-pr-1252-20240125041511(transitive)
+ Addedesbuild@0.19.12(transitive)
+ Addedlilconfig@3.1.3(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedpostcss-load-config@4.0.2(transitive)
+ Addedyaml@2.7.0(transitive)
- Removed@esbuild/android-arm@0.18.20(transitive)
- Removed@esbuild/android-arm64@0.18.20(transitive)
- Removed@esbuild/android-x64@0.18.20(transitive)
- Removed@esbuild/darwin-arm64@0.18.20(transitive)
- Removed@esbuild/darwin-x64@0.18.20(transitive)
- Removed@esbuild/freebsd-arm64@0.18.20(transitive)
- Removed@esbuild/freebsd-x64@0.18.20(transitive)
- Removed@esbuild/linux-arm@0.18.20(transitive)
- Removed@esbuild/linux-arm64@0.18.20(transitive)
- Removed@esbuild/linux-ia32@0.18.20(transitive)
- Removed@esbuild/linux-loong64@0.18.20(transitive)
- Removed@esbuild/linux-mips64el@0.18.20(transitive)
- Removed@esbuild/linux-ppc64@0.18.20(transitive)
- Removed@esbuild/linux-riscv64@0.18.20(transitive)
- Removed@esbuild/linux-s390x@0.18.20(transitive)
- Removed@esbuild/linux-x64@0.18.20(transitive)
- Removed@esbuild/netbsd-x64@0.18.20(transitive)
- Removed@esbuild/openbsd-x64@0.18.20(transitive)
- Removed@esbuild/sunos-x64@0.18.20(transitive)
- Removed@esbuild/win32-arm64@0.18.20(transitive)
- Removed@esbuild/win32-ia32@0.18.20(transitive)
- Removed@esbuild/win32-x64@0.18.20(transitive)
- Removed@vanilla-extract/integration@0.0.0-webpack-vite-compiler-wip-20240609024920(transitive)
- Removedesbuild@0.18.20(transitive)
- Removedlilconfig@2.1.0(transitive)
- Removedpostcss-load-config@3.1.4(transitive)
- Removedrollup@3.29.5(transitive)
- Removedvite@4.5.9(transitive)
- Removedyaml@1.10.2(transitive)
Updated@vanilla-extract/integration@0.0.0-proxy-pr-1252-20240125041511
Updatedpostcss-load-config@^4.0.1