Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

v3 #29

Open
borisirota opened this issue Sep 1, 2017 · 0 comments
Open

v3 #29

borisirota opened this issue Sep 1, 2017 · 0 comments

Comments

@borisirota
Copy link
Owner

borisirota commented Sep 1, 2017

https://webpack.js.org/api/plugins/
https://webpack.js.org/development/how-to-write-a-plugin/
https://webpack.js.org/development/plugin-patterns/
https://github.com/webpack/docs/wiki/how-to-write-a-plugin
https://webpack.js.org/api/plugins/compiler/
https://webpack.js.org/api/plugins/compilation/
https://webpack.js.org/api/parser/
https://github.com/webpack-contrib/worker-loader
https://github.com/webpack/webpack/tree/master/lib/webworker
https://www.youtube.com/watch?v=NHI_PhoykVU
https://github.com/TheLarkInn/everything-is-a-plugin
https://github.com/TheLarkInn/artsy-webpack-tour

https://medium.com/webpack/contributors-guide/home

extract-text-webpack-plugin:
https://github.com/webpack-contrib/extract-text-webpack-plugin/blob/master/src/index.js
https://github.com/webpack-contrib/extract-text-webpack-plugin/blob/master/src/loader.js

Preact async loader:

  1. https://github.com/developit/preact-cli/blob/master/src/lib/webpack/async-component-loader.js
  2. https://github.com/developit/preact-cli/blob/master/src/components/async.js

it isn't possible to create new files in loader so there is need to make a plugin if I want to make one worker builder module:
https://webpack.js.org/api/loaders/
webpack/webpack#3311 (comment)
webpack/webpack.js.org#116

Maybe the best solution is to make a plugin that:

  1. generates a webworkify module once (based on https://github.com/webpack/webpack/blob/master/lib/MainTemplate.js) and adds it as a module (where ? to which chunk ? how can I know to where ?). Maybe this should be done by a loader ? its possible if we still import and call the webworkify-webpack module directly + it can be used as a drop in replacement for webworkify
  2. for every worker file, generate a wrapper which gets the module dependencies (including dll) of the module, replace the dependency of the original module and this way injects its result into webworkify-webpack.

https://github.com/jamiehill/path-override-webpack-plugin
https://github.com/webpack/webpack/blob/master/lib/NormalModuleFactory.js#L218
https://github.com/webpack/webpack/blob/master/lib/FunctionModuleTemplatePlugin.js

DLL:
https://github.com/webpack/webpack/blob/master/lib/DllReferencePlugin.js
https://github.com/webpack/webpack/blob/master/lib/DelegatedModuleFactoryPlugin.js
https://github.com/webpack/webpack/blob/master/lib/DelegatedModule.js

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant