New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@leaflink/vite-plugin-importmap

Package Overview
Dependencies
Maintainers
7
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leaflink/vite-plugin-importmap - npm Package Compare versions

Comparing version 0.0.0-PR-4--edcb610 to 0.0.0-PR-5--0aa93be

2

dist/index.d.ts

@@ -6,3 +6,3 @@ import { type Plugin } from 'vite';

};
export declare function buildImportMap(config: ImportMap): Plugin;
export default function buildImportMap(config: ImportMap): Plugin;
export {};
const prefix = '/@import-maps/';
export function buildImportMap(config) {
export default function buildImportMap(config) {
const importKeys = Object.keys(config.imports);

@@ -4,0 +4,0 @@ const importMap = {

import { expect, it } from 'vitest';
import { buildImportMap } from './index.js';
import buildImportMap from './index.js';
it('resolves configured imports to the import map aliases', () => {

@@ -4,0 +4,0 @@ const pluginResult = buildImportMap({

{
"name": "@leaflink/vite-plugin-importmap",
"version": "0.0.0-PR-4--edcb610",
"version": "0.0.0-PR-5--0aa93be",
"description": "Vite plugin to allow loading dependencies via native import maps",

@@ -15,3 +15,4 @@ "exports": {

"lint": "eslint",
"lint:commits": "commitlint"
"lint:commits": "commitlint",
"test": "vitest --reporter verbose"
},

@@ -21,4 +22,6 @@ "author": "",

"devDependencies": {
"@vitest/coverage-v8": "^0.34.6",
"eslint": "^8.51.0",
"eslint-config-leaflink": "^1.18.0",
"jsdom": "^22.1.0",
"typescript": "^5.2.2",

@@ -25,0 +28,0 @@ "vite": "^4.4.11",

@@ -11,6 +11,6 @@ # @leaflink/vite-plugin-importmap

Import the `buildImportMap` function and add to the plugins section of your Vite config.
Import and add to the plugins section of your Vite config:
```
import { buildImportMap } from '@leaflink/vite-plugin-importmap';
import buildImportMap from '@leaflink/vite-plugin-importmap';

@@ -17,0 +17,0 @@ export default defineConfig(({ mode }) => {

Sorry, the diff of this file is not supported yet

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