Closed voltidev closed 8 years ago
I'm unable to reproduce this just by dropping ember-cli-svgstore
into a vanilla Ember app. Can you provide more information about your setup?
CLI version, any extra configuration for this addon, etc. would be super helpful in trying to track this down.
I use Ember CLI v2.5.0 Here you can see my app, including package.json: [https://github.com/ivanvotti/time-tracker]()
I've just made a new ember app and could reproduce the problem.
ember-cli-svgstore
to package.jsonember-cli-build.js
file: var app = new EmberApp(defaults, {
svgstore: {
files: {
sourceDirs: 'icons',
outputFile: '/assets/icons.svg'
}
}
});
Aha, I see. This looks like an issue upstream in broccoli-svgstore – it doesn't cache its output, so the entire app tree gets invalidated each time there's a rebuild.
I'm not likely to have a chance to get to this in the near future (we're not actually using this addon internally at the moment), but fixing this should just be a matter of swapping in broccoli-caching-writer
as the base class for that plugin.
Added an issue (above), and a PR to fix the issue (https://github.com/svgstore/broccoli-svgstore/pull/12) to the broccoli-svgstore repo.
broccoli-svgstore
0.2.0 has just been released -- giving it a much-needed update after almost 2 years 😄. It builds on top of broccoli-caching-writer
, so I'm thinking it should resolve this issue.
As you might know,
ember-cli
has a built-in styles hot reloading feature. So when you change your SCSS/CSS files, only styles will be reloaded and your app will keep the same state in the browser.But if I add
ember-cli-svgstore
to thepackage.json
, the hot reloading feature doesn't work at all, so any changes in style files will force the whole browser tab to reload.