root-path-plugin

This plugin can get the root directory of the project directly

Usage no npm install needed!

<script type="module">
  import rootPathPlugin from 'https://cdn.skypack.dev/root-path-plugin';
</script>

README

Instructions
const root = require("root-path/index")
console.log(root)