Ember-cli: 0.33
How can I use web workers within an ember-cli based project?
Example - I have a component and I want to start a web worker:
import Ember from 'ember';
export default Ember.Component.extend({
_startWorker: function() {
var worker = new Worker('path/to/worker.js');
}.on('didInsertElement')
});
In which folder should I put the worker.js file inside the ember-cli project structure? Which other changes are required (Brocfile.js,...)?
One possible solution:
1) In your ember project root folder add a new folder with the name 'workers'.
2) Update your Brocfile.js (see Screenshot)
3) Write workers :-)