vite-plugin-qingkuai 1.0.2 → 1.0.3
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 -2
- package/dist/index.js +3 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -100,9 +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
104
|
const confIdentifierRE = /__qk_expose_(?:dependencies|destructions)__/g;
|
|
104
105
|
const styleIdRE = /^virtual:\[\d+\].*?\.qk.(?:css|s[ac]ss|less|stylus|postcss)\?\d{13}$/;
|
|
105
|
-
const
|
|
106
|
+
const qingkuaiPackageBuildRE = /node_modules\/qingkuai\/dist\/esm\/(?:chunks|runtime)\/\w+\.js$/;
|
|
106
107
|
return {
|
|
107
108
|
name: "qingkuai-compiler",
|
|
108
109
|
config(_, env) {
|
|
@@ -188,7 +189,7 @@ function qingkuaiPlugin() {
|
|
|
188
189
|
async transform(src, id) {
|
|
189
190
|
const qingkuaiConfig = getQingkuaiConfiguration(id);
|
|
190
191
|
if (!id.endsWith(".qk")) {
|
|
191
|
-
if (!isDev &&
|
|
192
|
+
if (isDev && qingkuaiPackageServeRE.test(id) || !isDev && qingkuaiPackageBuildRE.test(id)) {
|
|
192
193
|
const ret = src.replace(confIdentifierRE, (s) => {
|
|
193
194
|
switch (s) {
|
|
194
195
|
case "__qk_expose_dependencies__":
|
package/dist/index.js
CHANGED
|
@@ -98,9 +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
102
|
const confIdentifierRE = /__qk_expose_(?:dependencies|destructions)__/g;
|
|
102
103
|
const styleIdRE = /^virtual:\[\d+\].*?\.qk.(?:css|s[ac]ss|less|stylus|postcss)\?\d{13}$/;
|
|
103
|
-
const
|
|
104
|
+
const qingkuaiPackageBuildRE = /node_modules\/qingkuai\/dist\/esm\/(?:chunks|runtime)\/\w+\.js$/;
|
|
104
105
|
return {
|
|
105
106
|
name: "qingkuai-compiler",
|
|
106
107
|
config(_, env) {
|
|
@@ -186,7 +187,7 @@ function qingkuaiPlugin() {
|
|
|
186
187
|
async transform(src, id) {
|
|
187
188
|
const qingkuaiConfig = getQingkuaiConfiguration(id);
|
|
188
189
|
if (!id.endsWith(".qk")) {
|
|
189
|
-
if (!isDev &&
|
|
190
|
+
if (isDev && qingkuaiPackageServeRE.test(id) || !isDev && qingkuaiPackageBuildRE.test(id)) {
|
|
190
191
|
const ret = src.replace(confIdentifierRE, (s) => {
|
|
191
192
|
switch (s) {
|
|
192
193
|
case "__qk_expose_dependencies__":
|