1.0.6 • Published 12 months ago

import-node-modules v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

import-node-modules

Helper to set a global node_modules variable to include from the /node_modules path in vanilla ES6 modules.

Example

<!-- only works, when included from within the node_modules folder --> 
<script type="module" src="../node_modules/import-node-modules/index.js"></script>
<script type="module">
    // 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);
</script>

It's simple, it's stupid, but it works.

1.0.6

12 months ago

1.0.5

12 months ago

1.0.4

12 months ago

1.0.2

12 months ago

1.0.0

12 months ago