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

dpacker

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dpacker

A webpack module splitter & beautifier

  • 1.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

DPacker

A webpack module splitter & beautifier

Originally designed for discord.. but can be used for pretty much anything..

Usage

Make sure all your files are in one folder (no subfolders). In this example, I will call it assets-canary

Simply run...

npx dpacker ./assets-canary [-b] [-d]

Parameters

Flag nameShorthandDefault ValuePurpose
--input-iThe input directory of .js files
--outDir-o./outThe file to output the separated files
--manifest-mnullGenerate a manifest file at the specified path
--verbose-vfalseVerbose output
--beautify-bfalseBeautify the outputted javascript files
--allowDuplicates-dfalseAllows duplicate files to be generated when detected
--force-ffalseIf the output directory already exists, use this to overwrite it
--help-hShow the help menu

Flags:

-b is optional, and will auto-beautify the JS files as they're written.

-d is optional, and will write duplicate files if they share the ID. (By default, it ignores duplicate files as there's usually not any difference)

The files will be written into an out folder :)

Features

Splits large webpack bundle files into their individual modules. Has de-duplication built in, but can be disabled with the -d flag.

Converts requires and module.exports to correct form, rather than webpack's (e, t, n) format

requires that point to a module ID will be mapped to require("./moduleId.js") for IDE compatibility, and should help with recompilation.

FAQs

Package last updated on 12 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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