vite-plugin-qingkuai 1.0.4 → 1.0.5
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.
- package/dist/index.cjs +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/temp-type/index.d.ts +2 -2
- package/dist/temp-type/scope.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -100,10 +100,10 @@ function qingkuaiPlugin() {
|
|
|
100
100
|
let viteConfig;
|
|
101
101
|
const compileResultCache = /* @__PURE__ */ new Map();
|
|
102
102
|
const qingkuaiConfigurations = /* @__PURE__ */ new Map();
|
|
103
|
-
const qingkuaiPackageServeRE = /node_modules\/\.vite\/deps\/chunk
|
|
103
|
+
const qingkuaiPackageServeRE = /node_modules\/\.vite\/deps\/chunk-.*$/;
|
|
104
104
|
const confIdentifierRE = /__qk_expose_(?:dependencies|destructions)__/g;
|
|
105
105
|
const styleIdRE = /^virtual:\[\d+\].*?\.qk.(?:css|s[ac]ss|less|stylus|postcss)\?\d{13}$/;
|
|
106
|
-
const qingkuaiPackageBuildRE = /node_modules
|
|
106
|
+
const qingkuaiPackageBuildRE = /(?:node_modules)?\/qingkuai\/dist\/esm\/(?:chunks|runtime)\/\w+\.js$/;
|
|
107
107
|
return {
|
|
108
108
|
name: "qingkuai-compiler",
|
|
109
109
|
config(_, env) {
|
|
@@ -189,7 +189,7 @@ function qingkuaiPlugin() {
|
|
|
189
189
|
async transform(src, id) {
|
|
190
190
|
const qingkuaiConfig = getQingkuaiConfiguration(id);
|
|
191
191
|
if (!id.endsWith(".qk")) {
|
|
192
|
-
if (
|
|
192
|
+
if (qingkuaiPackageServeRE.test(id) || qingkuaiPackageBuildRE.test(id)) {
|
|
193
193
|
const ret = src.replace(confIdentifierRE, (s) => {
|
|
194
194
|
switch (s) {
|
|
195
195
|
case "__qk_expose_dependencies__":
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -98,10 +98,10 @@ function qingkuaiPlugin() {
|
|
|
98
98
|
let viteConfig;
|
|
99
99
|
const compileResultCache = /* @__PURE__ */ new Map();
|
|
100
100
|
const qingkuaiConfigurations = /* @__PURE__ */ new Map();
|
|
101
|
-
const qingkuaiPackageServeRE = /node_modules\/\.vite\/deps\/chunk
|
|
101
|
+
const qingkuaiPackageServeRE = /node_modules\/\.vite\/deps\/chunk-.*$/;
|
|
102
102
|
const confIdentifierRE = /__qk_expose_(?:dependencies|destructions)__/g;
|
|
103
103
|
const styleIdRE = /^virtual:\[\d+\].*?\.qk.(?:css|s[ac]ss|less|stylus|postcss)\?\d{13}$/;
|
|
104
|
-
const qingkuaiPackageBuildRE = /node_modules
|
|
104
|
+
const qingkuaiPackageBuildRE = /(?:node_modules)?\/qingkuai\/dist\/esm\/(?:chunks|runtime)\/\w+\.js$/;
|
|
105
105
|
return {
|
|
106
106
|
name: "qingkuai-compiler",
|
|
107
107
|
config(_, env) {
|
|
@@ -187,7 +187,7 @@ function qingkuaiPlugin() {
|
|
|
187
187
|
async transform(src, id) {
|
|
188
188
|
const qingkuaiConfig = getQingkuaiConfiguration(id);
|
|
189
189
|
if (!id.endsWith(".qk")) {
|
|
190
|
-
if (
|
|
190
|
+
if (qingkuaiPackageServeRE.test(id) || qingkuaiPackageBuildRE.test(id)) {
|
|
191
191
|
const ret = src.replace(confIdentifierRE, (s) => {
|
|
192
192
|
switch (s) {
|
|
193
193
|
case "__qk_expose_dependencies__":
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export default function qingkuaiPlugin():
|
|
1
|
+
import type { PluginOption } from "vite";
|
|
2
|
+
export default function qingkuaiPlugin(): PluginOption;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SourceMap } from "./types";
|
|
2
|
-
export declare function attachScopeForStyleSelectors(code: string, hash: string,
|
|
2
|
+
export declare function attachScopeForStyleSelectors(code: string, hash: string, sourceFile: string, map: SourceMap | undefined): Promise<{
|
|
3
3
|
code: string;
|
|
4
4
|
mappings: string;
|
|
5
5
|
}>;
|