Closed maier49 closed 7 years ago
Awesome!
Are there any changes to authoring tests in downstream applications?
Also, we should have at least some sort of test with this as well.
Although I have no issue with the dependency, we so far have tried to avoid inline webpack loader requires, for the same reasoning as AMD plugins.
we so far have tried to avoid inline webpack loader requires
Yeah, good point, I hadn't appreciated that. Would a better approach be an abstraction that is part of Dojo 2 (maybe core) that ensure that it worked.
Also, if we do go with an approach like this, we should still find a better way to integrate it. We can type plugins now with something like:
declare module 'worker-loader?*' {
export = /* ... */
}
Would we not be able to create something that wrapped ES import()
that we could also inject some feature detection, so the code was isomorphic on Node.js as well?
This feature needs further discussion to decide on the best approach. https://github.com/dojo/meta/issues/190 has been created for that purpose.
Type: feature
The following has been addressed in the PR:
Description:
Adding this dependency would allow the use of webworkers in a dojo app using this syntax
It works with a normal build or the dev server, and causes a separate compilation for the webworker. Dependencies can be pulled into the webworker and will be built into a separate bundle.