# requirejs-config

> The small utilities to load require.js config path and shim configuration.

Latest version **1.0.5** (published 2019-01-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install requirejs-config
pnpm add requirejs-config
yarn add requirejs-config
bun add requirejs-config
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2019-01-22 |
| First published | 2019-01-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 14.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Shiba Komino |
| Maintainers | komino |
| Keywords | requirejs, amd |

## Links

- npm: https://www.npmjs.com/package/requirejs-config
- Repository: https://github.com/digi3colin/requirejs-config
- Homepage: https://github.com/digi3colin/requirejs-config#readme
- Issues: https://github.com/digi3colin/requirejs-config/issues
- npm.io page: https://npm.io/package/requirejs-config

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 1.0.5 (latest) — 2019-01-22
- 1.0.4 — 2019-01-22
- 1.0.3 — 2019-01-22
- 1.0.2 — 2019-01-21
- 1.0.1 — 2019-01-21
- 1.0.0 — 2019-01-21

## README

# requirejs-config
The small utilities to load require.js config path and shim configuration.

### How to use
All the sample written in es6 then precompiled to umd modules.

html:
````
<script data-main="main" src="//cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js"></script>
````

config.jsx
````
export default {
  paths : {
    "react"            : "//unpkg.com/react@16.7.0/umd/react.development",
    "react-dom"        : "//unpkg.com/react-dom@16.7.0/umd/react-dom.development",
  },
  shim: {

  },
}
````

config2.jsx
````
export default {
  paths : {
    "jquery"           : "//unpkg.com/jquery@2.2.4/dist/jquery.min",
  },
  shim: {
    'jquery' : {
      exports: '$'
    },
  },
}
````


main.jsx
````
import loadConfig from "//unpkg.com/requirejs-config@1.0.0/index.min";
loadConfig(['./config', './config2'], ()=>{
  require(['react', 'jquery'], (React, JQuery) =>{
    console.log(React);
    console.log(JQuery);
  });
});
````

---
_Source: https://npm.io/package/requirejs-config · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
