Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vite-plugin-components

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-components - npm Package Compare versions

Comparing version 0.6.9 to 0.6.10

1

dist/index.d.ts

@@ -68,2 +68,3 @@ import { Plugin } from 'vite';

globs: string[];
watchGlobs: string[];
};

@@ -70,0 +71,0 @@ interface ComponentInfo {

9

dist/index.js

@@ -131,4 +131,5 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var __assign = Object.assign;

const extsGlob = resolved.extensions.length === 1 ? resolved.extensions : `{${resolved.extensions.join(",")}}`;
resolved.globs = toArray(resolved.dirs).map((i) => resolved.deep ? _path.join.call(void 0, i, `/**/*.${extsGlob}`) : _path.join.call(void 0, i, `/*.${extsGlob}`));
resolved.globs = toArray(resolved.dirs).map((i) => resolved.deep ? `${i}/**/*.${extsGlob}` : `${i}/*.${extsGlob}`);
resolved.dirs = toArray(resolved.dirs).map((i) => _path.resolve.call(void 0, viteConfig.root, i));
resolved.watchGlobs = toArray(resolved.dirs).map((i) => resolved.deep ? _path.join.call(void 0, i, `/**/*.${extsGlob}`) : _path.join.call(void 0, i, `/*.${extsGlob}`));
if (!resolved.extensions.length)

@@ -208,6 +209,6 @@ throw new Error("[vite-plugin-components] extensions are required to search for components");

this.options = resolveOptions(options, viteConfig);
const {globs, dirs} = this.options;
const {watchGlobs, dirs} = this.options;
if (viteConfig.command === "serve") {
_chokidar2.default.watch(dirs, {ignoreInitial: true}).on("unlink", (path) => {
if (matchGlobs(path, globs)) {
if (matchGlobs(path, watchGlobs)) {
this.removeComponents(path);

@@ -217,3 +218,3 @@ this.onUpdate(path);

}).on("add", (path) => {
if (matchGlobs(path, globs)) {
if (matchGlobs(path, watchGlobs)) {
this.addComponents(path);

@@ -220,0 +221,0 @@ this.onUpdate(path);

{
"name": "vite-plugin-components",
"description": "Components auto importing for Vite",
"version": "0.6.9",
"version": "0.6.10",
"main": "dist/index.js",

@@ -6,0 +6,0 @@ "module": "dist/index.mjs",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc