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

@parcel/transformer-raw

Package Overview
Dependencies
Maintainers
1
Versions
897
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@parcel/transformer-raw

  • 2.13.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
280K
increased by3.44%
Maintainers
1
Weekly downloads
 
Created

What is @parcel/transformer-raw?

@parcel/transformer-raw is a transformer plugin for Parcel, a web application bundler. This plugin allows you to import raw content from files as strings. It is particularly useful for importing non-code assets like text files, HTML, or any other file types that you want to include as raw strings in your JavaScript code.

What are @parcel/transformer-raw's main functionalities?

Importing raw content from text files

This feature allows you to import the content of a text file as a string. The 'bundle-text:' prefix tells Parcel to use the @parcel/transformer-raw plugin to handle the import.

import rawContent from 'bundle-text:./example.txt';
console.log(rawContent);

Importing raw content from HTML files

Similar to importing text files, this feature allows you to import the content of an HTML file as a string. This can be useful for embedding HTML templates directly into your JavaScript code.

import rawHtml from 'bundle-text:./example.html';
console.log(rawHtml);

Importing raw content from any file type

This feature demonstrates the flexibility of @parcel/transformer-raw by allowing you to import raw content from any file type, not just text or HTML. This can be useful for custom file types or binary data.

import rawData from 'bundle-text:./example.xyz';
console.log(rawData);

Other packages similar to @parcel/transformer-raw

FAQs

Package last updated on 16 Dec 2024

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