-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature/issue 1233 CSS Modules ™️ plugin #1285
feature/issue 1233 CSS Modules ™️ plugin #1285
Conversation
So the topic of custom formats, we are principally limited to what we can reasonably cover with acorn due to the fact that, at least as of now, our implementation here depends on us crawling through all Unfortunately, acorn on supports walking synchronously, which is in conflict with processing all these files first using Greenwood plugins (like say we do in rollup.config.js) since plugins are So for now, just doing what I did in WCC in adding basic support for TypeScript stripping and called out whats supported in the plugin's README. Perhaps there is a better implementation to be found, so definitely open to PRs that could help work around this problem, but i think this is good enough for now. 😇 |
a0d4b6a
to
55a6dd2
Compare
* initial port from website repo * build and prerender test case * build and develop test cases * README and website documentation * only patch JSDOM within test setup blocks * handle module types for scripts * support any custom identifier * update test case label * testing for nested CSS module * better path detection handling * additional nested and recursive test cases * clean up and final testing * misc refactoring * basic TS support and caveats for other formats
Related Issue
resolves #1233
Summary of Changes
TODO
response.clone()
/ mergeResponse in prerender lifecycle is actually needed - yes, and we should include it anywayNice to have
better implementation than having to write to a file on disk (cssModulesMap.json)- the main issue here is that for SSR / prerender, we can't save toglobalThis
since memory is not shared inWorker
threads, so will have to leave it for nowundefined
styles (e.g. selector from the CSS is not found in the HTML). maybe with option to fail on build? otherwise by default this will just "break" the client, which is good / better I guess?import
(or only top level<script>
tags) - seems to be working just fine per test cases verification