yamm3
yamm3 copied to clipboard
Separate yamm.css and _yamm.scss to different directories
Move the compiled yamm.css to a dist
directory.
When compiling yamm3 using webpack and sass, the following error is received:
SassError: It's not clear which file to import for '@import ".../node_modules/@geedmo/yamm3/yamm/yamm"'.
Candidates:
.../node_modules/@geedmo/yamm3/yamm/_yamm.scss
.../node_modules/@geedmo/yamm3/yamm/yamm.css
Please delete or rename all but one of these files.
on line 1 of .../app/javascript/stylesheets/application.scss
By moving the compiled output to a separate directory, it avoids the ambiguity. The source files continue to live in the yamm directory. The output now lives in the dist directory, which is commonly used by other projects (e.g. jQuery).
Another solution would be to remove the _yamm.scss
file entirely. That would also remove the ambiguity. As the file contains no variables, functions, mixins or other interesting SASS features, it doesn't really offer a practical advantage over the CSS file. They are equivalent. Let me know if you would prefer I go that route instead.