I developed “rt-link-loader”. This is small helper procedure for webpack. I wanted to get css loader not to syntax check at compile time. I am going to process css on server side. My css file is not valid on compile time. I tried some webpack loaders, but nothing to resolve my requirements. I decided to write loader for me. I thought that I understand webpack’s compile process well too.
After I read some code and documents, I could have test code for runtime-link-loader project. When I tested the project, I realized jsdom did not initialize CSSStyleSheet href property. When I compile my project with this loader, the browser will be filled CSSStyleSheet ref. I worked around to set CSSStyleSheet ref in test code. I do not know that the workaround is correct test way. Anyway I had the “rt-link-loader”.
Through this development, I could understands following technologies.
- webpack loader processing
- jest test procedure
You can see this project on github.
rt-link-loader is available from npm repository.