sass-brunch
sass-brunch copied to clipboard
Empty compilation output
Hi,
Compilation generates empty output. I set couple of sass/scss files :
- fubar.css
- fubar.sass
- fubar.scss
it compiles a app.css file with only content from the fubar.css file.
The app.css.map contain the following informations :
"sourcesContent":["h1{\n font-weight: 200;\n}\n","",""]
where the two last empty string comme from fubar.sass and fubar.scss
However fubar.sass and fubar.scss are really compiled. If I drop some error in those files, brunch ouput thoses error in the console.
Any idea ?
- sass --version : Sass 3.4.19
- brunch --version : 1.8.5
- node --version : v0.10.32
- sass-brunch version : 1.9.1
Brunch config, coming from elixir initialisation :
exports.config = {
// See http://brunch.io/#documentation for docs.
files: {
javascripts: {
joinTo: "js/app.js"
},
stylesheets: {
joinTo: "css/app.css"
},
templates: {
joinTo: "js/app.js"
}
},
conventions: {
assets: /^(web\/static\/assets)/
},
// Phoenix paths configuration
paths: {
// Dependencies and current project directories to watch
watched: [
"deps/phoenix/web/static",
"deps/phoenix_html/web/static",
"web/static",
"test/static"
],
// Where to compile files to
public: "priv/static"
},
// Configure your plugins
plugins: {
babel: {
// Do not use ES6 compiler in vendor code
ignore: [/web\/static\/vendor/]
},
sass: {
// debug: 'comments',
// mode: 'native',
options: {
includePaths: ['bower_components/foundation/scss'],
}
}
},
modules: {
autoRequire: {
"js/app.js": ["web/static/js/app"]
}
},
npm: {
enabled: true
}
};
Not sure if you have solved the issue.
What happens when you would have 3 different filenames?
Same, I should have told that already, file name does not matter (each same of different, one by one or all together). What is concerning me is that passing mode: "native" or not does not change anything. Is there any way I can hook some code before/after the binary call. Even a monkey patch like adding a "print" line directly in the sources may help. It would allow me to check what is the exact cmd triggered to try it manually and monitor returned variables. So I would be see more what is happening between dependencies clash or miss configuration.
Up, i've same problem for my app.scss :(
compiled app.scss into app.min.css in 954ms
But my app.min.css is empty, but my source map have full line.
Exactly this problem I am facing as well.
It seems to happen more-or-less randomly, i.e. I cannot seem to find a pattern in it. But once it happens, it stays broken until I restart Brunch.
@paulmillr A fix is planned soon ? : )
@paulmillr I up this ticket, any solution for this problem ?
Hey, @LeG3nDz, could you please give me some info so that I can help you: sass --version ? brunch --version ? node --version ? sass-brunch version ?
I posted a similar question to the Stackoverflow.
It is strange that my problem does not occur on my Mac, but on Ubuntu 16.04.
The Ubuntu box is freshly installed on Virtualbox.
Here is my environment:
- Ubuntu 16.04 Desktop
- Phoenix 1.2.5
- Node.js 8.9.1
- npm 5.5.1
- Brunch 2.10.7
- sass-brunch 2.10.4
I also have installed inofity-tools
package.
I found a workaround.
Put these lines to the brunch-config.js
:
watcher: {
usePolling: true
}
As the documentation of Brunch says, watcher gets slower but can be more reliable by setting true
to this option.
At least on my environment, situation has improved cleary.
Solved my problem on Ubuntu 16.04.