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

rollup-plugin-json

Package Overview
Dependencies
Maintainers
3
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-json

Convert .json files to ES6 modules:

  • 3.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
177K
increased by81.08%
Maintainers
3
Weekly downloads
 
Created

What is rollup-plugin-json?

The rollup-plugin-json package is a Rollup plugin that allows you to import JSON files into your JavaScript bundles. It converts JSON files into ES6 modules, enabling you to use JSON data directly in your Rollup projects.

What are rollup-plugin-json's main functionalities?

Import JSON files

This feature allows you to import JSON files directly into your JavaScript code. The JSON data is converted into an ES6 module, making it easy to work with JSON data in your Rollup projects.

import data from './data.json';
console.log(data);

Convert JSON to ES6 modules

The plugin converts JSON files into ES6 modules, allowing you to access JSON properties as if they were part of a JavaScript object. This makes it convenient to manage configuration or data files in JSON format.

import config from './config.json';
console.log(config.setting);

Other packages similar to rollup-plugin-json

FAQs

Package last updated on 13 Sep 2018

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