Skip to content
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

bug/issue 1338 handle bundling of bare CSS @import specifiers #1342

Conversation

thescientist13
Copy link
Member

@thescientist13 thescientist13 commented Dec 11, 2024

Related Issue

resolves #1338

Documentation

N / A

Summary of Changes

  1. Resolve and bundle bare CSS @import specifiers
  2. Add test case

TODO

  1. should probably rename url variables for better naming for better clarity (e.g. url -> sourceUrl)
  2. rebase after enhancement/issue 684 import meta resolve refactor part 2 #1341
  3. remove demo code
  4. (nice to have or make a standalone issue) wondering if we could use this technique to handle this case for url(...) - https://github.com/ProjectEvergreen/greenwood/blob/master/packages/cli/src/plugins/resource/plugin-standard-css.js#L75
    • will make an issue once I put together a minimal reproduction for the issue

@thescientist13 thescientist13 added bug Something isn't working CLI labels Dec 11, 2024
const importContents = fs.readFileSync(resolvedUrl, 'utf-8');
if (!value.startsWith('http')) {
if (value.indexOf('.') === 0 || value.indexOf('/node_modules') === 0) {
const resolvedUrl = value.startsWith('/node_modules')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thescientist13 thescientist13 force-pushed the bug/issue-1338-resolve-and-bundle-bare-CSS-import-specifiers branch from 6948631 to a87a6db Compare December 13, 2024 18:11
@thescientist13 thescientist13 merged commit cbfb48c into master Dec 13, 2024
8 checks passed
@thescientist13 thescientist13 deleted the bug/issue-1338-resolve-and-bundle-bare-CSS-import-specifiers branch December 13, 2024 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CLI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bare CSS @import specifiers are not resolving and bundling correctly
1 participant