I would like to create a library that can be npm installed into one of a dozen javascript projects (some are ES6 projects, but many are much older ES5 projects). The library project also has a few very common javascript methods / classes / components / etc.
(As an aside, the library project includes a couple of common methods and utilities that were written ES6, but transpiled with webpack+babel to also be used in both ES5 and ES6 projects. Meaning: my input file in webpack.config is a file of module.exports; my output is a single build file.)
The main issue:
On implementation on ES6, a react project for example, I'm not sure how to import 'nodeModuleName/someSimpleCssFile' that will allow the webpack/babel (on the implementation side) to do it's thing. On one project in particular, the only thing being imported from this project is a single global stylesheet.
On implementation on the older projects, the developer needs to be able to use the <link /> tag to pull in one style sheet.
I know I could simply put all of the css files in a folder that is designated in the main property of package.json, but is this the best way? It also seems like, going forward, if the styler added background: url('some/path/to/image.png'); that using the babel transpiler would pull all of that stuff into the single build file.
The question in that case would be, how do I import only one css file that is being transpiled into a single build file? Or, rather, how do I even include that single css file in my main module.exports to be exported so that I can, somehow, import only that css file into an ES6/ES2015 project?