1
我在https://github.com/joostvanrijn/webpacker創建了一個示例應用程序是完整的,但這裏是我的問題:Webpacker使用Rails編譯SCSS諧音
# app/javascript/packs/stylesheets.scss
@import 'variables';
@import 'foo';
# app/javascript/packs/_variables.scss
$bar: #fff;
# app/javascript/packs/_foo.scss
body {
color: $bar;
}
現在,當我運行/bin/webpack-dev-server
我得到
Undefined variable: "$bar".
而且更重要的是
[84] ./app/javascript/packs/_foo.scss 988 bytes {2} [built] [failed] [1 error]
好像Rails/webpacker編譯所有文件而不是ju st