PostCSS plugin to omit tilde in sass import function argument.
This plugin may be useful in case of large frontend ecosystem with different bundlers (webpack and gulp in my case).
For example, you have some sass file, which is built by webpack and depends
from some external library. This library is imported by @import "~awesome-lib"
(~
for root). Also you have another dependency from some internal file,
which is built by gulp and has dependency @import "awesome-lib"
(no tilde).
This build is going to be broken, because webpack cannot import such dependency,
and on the other hand, gulp cannot build @import "~awesome-lib"
if we just
change it.
So you can use this plugin in chain to build styles in gulp with dependency like
@import "~awesome-lib"
;
@import "~awesome-lib/awesome-style.scss";
@import "awesome-lib/awesome-style.scss";
postcss([ require('postcss-omit-import-tilde') ])
See PostCSS docs for examples for your environment.