https://github.com/shaack/import-node-modules
https://github.com/shaack/import-node-modules
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/shaack/import-node-modules
- Owner: shaack
- License: mit
- Created: 2023-05-13T14:54:53.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-16T18:23:06.000Z (about 3 years ago)
- Last Synced: 2025-03-08T10:51:57.571Z (over 1 year ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# import-node-modules
Helper to set a global `node_modules` variable to include from the /node_modules path in vanilla ES6 modules.
## Example
```html
// now you can use the `node_modules` variable to import from the `/node_modules` path
import {Chessboard} from `${node_modules}/cm-chessboard/src/Chessboard.js`;
console.log(Chessboard);
```
It's simple, it's stupid, but it works.