#410 and #418 (as explained in the wiki) make it possible to treat relative files as external by putting path.resolve('./relative-dep.js') into the externals array of your rollup configuration. However, as far as I can tell, that approach for skipping relative files will only work if the file exists (otherwise path.resolve will fail inside of the rollup configuration).
The use case for skipping a relative import without there being a file of the same name is for bundling projects that will later be System.imported (using SystemJS). The reason why the import does not match the relative filename exactly is because the project specifies which SystemJS plugin to use when loading the relative import. For example, my file tree may look like this:
src
-->main.js
-->main.css
where main.js is
import './main.css!cssmodules';
...
Is there a way I am unware of that allows for you to skip ./main.css!cssmodules when the filename is really just ./main.css??
#410 and #418 (as explained in the wiki) make it possible to treat relative files as external by putting
path.resolve('./relative-dep.js')into theexternalsarray of your rollup configuration. However, as far as I can tell, that approach for skipping relative files will only work if the file exists (otherwisepath.resolvewill fail inside of the rollup configuration).The use case for skipping a relative import without there being a file of the same name is for bundling projects that will later be
System.imported (using SystemJS). The reason why the import does not match the relative filename exactly is because the project specifies which SystemJS plugin to use when loading the relative import. For example, my file tree may look like this:where main.js is
Is there a way I am unware of that allows for you to skip
./main.css!cssmoduleswhen the filename is really just./main.css??