Huge News!Announcing our $40M Series B led by Abstract Ventures.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 1.0.2 to 1.0.3

2

dist/index.d.ts

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

};
export default function buildImportMap(config: ImportMap): Plugin;
export default function buildImportMap(importMap: ImportMap): Plugin;
export {};

@@ -1,11 +0,2 @@

const prefix = '/@import-maps/';
export default function buildImportMap(config) {
const importKeys = Object.keys(config.imports);
const importMap = {
imports: importKeys.reduce((memo, importName) => {
memo[prefix + importName] = config.imports[importName];
return memo;
}, {}),
scopes: config.scopes,
};
export default function buildImportMap(importMap) {
return {

@@ -15,11 +6,5 @@ name: 'plugin-importmap',

return {
resolve: {
alias: importKeys.reduce((memo, importName) => {
memo[importName] = prefix + importName;
return memo;
}, {}),
},
build: {
rollupOptions: {
external: importKeys.map((importName) => prefix + importName),
external: Object.keys(importMap.imports),
},

@@ -26,0 +11,0 @@ },

{
"name": "@leaflink/vite-plugin-importmap",
"version": "1.0.2",
"version": "1.0.3",
"description": "Vite plugin to allow loading dependencies via native import maps",

@@ -5,0 +5,0 @@ "exports": {

# @leaflink/vite-plugin-importmap
Vite plugin to allow loading dependencies via native import maps, based on [vite-plugin-import-maps](https://github.com/pakholeung37/vite-plugin-import-maps).
Vite plugin to allow loading dependencies via native import maps, based on [vite-plugin-import-maps](https://github.com/pakholeung37/vite-plugin-import-maps). It does not re-alias modules on build so can support peer dependencies loaded via import maps.

@@ -5,0 +5,0 @@ ## Installation

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