Socket
Book a DemoInstallSign in
Socket

@jopi-loader/tools

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jopi-loader/tools

Tools for jopi-loader

latest
npmnpm
Version
1.0.26
Version published
Weekly downloads
19
-97.02%
Maintainers
1
Weekly downloads
 
Created
Source

Jopi Loader

What is it?

It's a loader, which allows coustom imports for types for node.js and bun.js. His main goal is allowing doing React SSR (server side) with a high libary compatibility.

  • For Node.js and bun.js, it allows:

    • Importing css module import style from "style.module.css.
    • Importing scss module import style from "style.module.scss.
  • For Node.js, it allows:

    • Importing CSS, images, font.
    • When imported the value returned is the full path to the resource.
    • Ex: import cssFilePath from "my-style.css".

It's also export a module for EsBuild, in order to enable css-modules.

How to use?

The loader need to be loader before others modules, it's why you need to use a special functionality.

Exemple for node.js:

node --import jopi-loader ./myScript.js

Exemple for bun.js:

bun --preload jopi-loader ./myScript.js

With bun, you can also use a bunfig.toml file.

preload = ["jopi-loader"]

See: https://bun.com/docs/runtime/plugins

Typescript config

If you are using TypeScript, you need an extra entry in your tsconfig.json file. This file allows Typescript to know how to handle this imports.

{
  "compilerOptions": {
    "types": ["jopi-loader"]
  }
}

FAQs

Package last updated on 04 Sep 2025

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