Allow compiling empty scss files
Opened this issue · 2 comments
saravanabalagi commented
When an empty file is referenced, this error is thrown.
error: bundling failed: Error: No input specified: provide a file name or a source string to process
at Object.module.exports.renderSync (F:\Projects\js\my_awesome_app\node_modules\node-sass\lib\index.js:429:11)
at renderToCSS (F:\Projects\js\my_awesome_app\node_modules\react-native-sass-transformer\index.js:89:21)
at Object.module.exports.transform (F:\Projects\js\my_awesome_app\node_modules\react-native-sass-transformer\index.js:109:15)
at F:\Projects\js\my_awesome_app\node_modules\metro\src\JSTransformer\worker.js:231:31
at Generator.next (<anonymous>)
at asyncGeneratorStep (F:\Projects\js\my_awesome_app\node_modules\metro\src\JSTransformer\worker.js:75:24)
at _next (F:\Projects\js\my_awesome_app\node_modules\metro\src\JSTransformer\worker.js:95:9)
at F:\Projects\js\my_awesome_app\node_modules\metro\src\JSTransformer\worker.js:100:7
at new Promise (<anonymous>)
kristerkari commented
Thanks, should probably change it to do nothing if the file is empty.
saravanabalagi commented
At the moment, for workaround, I use comments in my scss template so when a new file is created it looks like,
// ${ClassName} styles
With comments, it compiles fine, even when empty. It's got a problem only with empty files.