🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@kkt/raw-modules

Package Overview
Dependencies
Maintainers
2
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kkt/raw-modules

Makes it easy to use the webpack raw-loader.

latest
Source
npmnpm
Version
7.5.5
Version published
Weekly downloads
130
-73.79%
Maintainers
2
Weekly downloads
 
Created
Source

@kkt/raw-modules

npm version

Makes it easy to use the webpack raw-loader

Installation

yarn add --dev @kkt/raw-modules
# or use npm if you don't have yarn yet
npm install --save-dev @kkt/raw-modules

Usage

In the .kktrc.js or .kktrc.ts you created for kkt add this code:

import path from 'path';
import rawModules from '@kkt/raw-modules';

export default (conf, evn, options) => {
  return rawModules(conf, evn, options);
}

In package.json, add a separate npm script to build library

{
  "scripts": {
    ...
    "build": "kkt build",
    "start": "kkt start",
    ...
  }
}

And you can now use CRA to build your library

Configurations

import path from 'path';
import rawModules from '@kkt/raw-modules';

export default (conf, evn, options) => {
  return rawModules(conf, evn, {
    /**
     * test @defalut /\.md$/i 
     **/
    test: /\.(txt|md)$/i,
    /**
     * esModule @defalut true 
     **/
    esModule: false,
  });
}

License

Licensed under the MIT License

Keywords

kkt

FAQs

Package last updated on 04 Jan 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