@weapp-core/init 1.1.5 → 1.1.6
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
CHANGED
|
@@ -386,7 +386,8 @@ function getDefaultTsconfigJson() {
|
|
|
386
386
|
],
|
|
387
387
|
include: [
|
|
388
388
|
"**/*.ts",
|
|
389
|
-
"**/*.js"
|
|
389
|
+
"**/*.js",
|
|
390
|
+
"vite-env.d.ts"
|
|
390
391
|
],
|
|
391
392
|
exclude: [
|
|
392
393
|
"node_modules",
|
|
@@ -569,7 +570,7 @@ async function initTsDtsFile(options) {
|
|
|
569
570
|
const { root, write = true } = options;
|
|
570
571
|
const targetFilename = "vite-env.d.ts";
|
|
571
572
|
const viteDtsFilePath = path.resolve(root, targetFilename);
|
|
572
|
-
const code = `/// <reference types="vite/client" />
|
|
573
|
+
const code = `/// <reference types="weapp-vite/client" />
|
|
573
574
|
`;
|
|
574
575
|
if (write) {
|
|
575
576
|
await import_fs_extra.default.outputFile(viteDtsFilePath, code, "utf8");
|
package/dist/index.js
CHANGED
|
@@ -340,7 +340,8 @@ function getDefaultTsconfigJson() {
|
|
|
340
340
|
],
|
|
341
341
|
include: [
|
|
342
342
|
"**/*.ts",
|
|
343
|
-
"**/*.js"
|
|
343
|
+
"**/*.js",
|
|
344
|
+
"vite-env.d.ts"
|
|
344
345
|
],
|
|
345
346
|
exclude: [
|
|
346
347
|
"node_modules",
|
|
@@ -523,7 +524,7 @@ async function initTsDtsFile(options) {
|
|
|
523
524
|
const { root, write = true } = options;
|
|
524
525
|
const targetFilename = "vite-env.d.ts";
|
|
525
526
|
const viteDtsFilePath = path.resolve(root, targetFilename);
|
|
526
|
-
const code = `/// <reference types="vite/client" />
|
|
527
|
+
const code = `/// <reference types="weapp-vite/client" />
|
|
527
528
|
`;
|
|
528
529
|
if (write) {
|
|
529
530
|
await fs.outputFile(viteDtsFilePath, code, "utf8");
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="weapp-vite/client" />
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|