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

@architect/plugin-bundles

Package Overview
Dependencies
Maintainers
6
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@architect/plugin-bundles - npm Package Compare versions

Comparing version 3.0.2 to 3.0.4

2

package.json
{
"name": "@architect/plugin-bundles",
"version": "3.0.2",
"version": "3.0.4",
"description": "plugin-bundles Plugin for exposing bundled modules to the browser from your Architect project.",

@@ -5,0 +5,0 @@ "main": "src/plugins/bundles/index.js",

@@ -27,23 +27,5 @@ `plugin-bundles

yolo /lib/yolo.mjs
```
``
In your lambda handler you now have access to a map with the path to bundled and fingerprinted modules
``` javascript
import map from '@architect/bundles/map.mjs'`
```
Map will look like this
``` javascript
export default {
"/_bundles/yolo.mjs": "/_bundles/yolo-232bd6a.mjs",
}
````
In your browser code you can now request modules from `/_bundles/` and the response will be the bundled and fingerprinted file.
You can use the map to look up the fingerprinted name.
``` javascript
import map from '@architect/bundles/map.mjs'`
const fingerprintedPath = map['/_bundles/yolo.mjs']
// fingerprintedPath would be: /_bundles/yolo-232bd6a.mjs
```
Bundles are will now be available at `/_static/bundles/yolo.mjs`
[If you have fingerprinting turned on then you can use `static.json` to look up the fingerprinted file name.](https://arc.codes/docs/en/guides/frontend/static-assets#fingerprint)

@@ -54,3 +54,3 @@ const path = require('path')

format: 'esm',
target: [ 'esnext' ],
target: [ 'es2022' ],
platform: 'browser',

@@ -57,0 +57,0 @@ external: [ 'fs', 'path' ],

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