How to add a single js file to my npm dependencies?

Viewed 536

I am trying to add a dependency to my package.json for my reactjs/webpack app. This is just a local file in my project but not a projectsource file. When I try in package.json:

"dependencies":
{
    "somemodule":"location_in_my_project/myfile.js"
}

I get an npmerror: 'not a package myfile.js'. Is it possible to inject this file into my project through npm?

0 Answers
Related