Currently we have multiple node package published in this format
I would like to be able to load these module from local without installing it so we can modify the code directly.
So I make the link in the folder tree like this
- company/
-- module1 -> ../../module1
-- module2 -> ../../module2
Now I want when I import from the scoped name, it will load from local files instead
import module1 from '@company/module1'
Load from my other folder instead of looking from node_modules instalations.
Can anyone help me on this? Thank you very much.
You can't import the modules, libraries, or a single file in the node.js with the common import statement import Example from "package".
So, try to use the const Example = require('package') instead.
const module1 = require("path/to/the/module1");
const module2 = require("path/to/the/module2");