question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't resolve fakecss-path with splitting: true

See original GitHub issue

One more time ))) I just want explain situation:

I have splitting bundles with css-chunks, but i can’t load css on page…

Screenshot 2021-03-21 at 10 01 24

index.js Screenshot 2021-03-21 at 10 09 45

index.css Screenshot 2021-03-21 at 10 09 19

I have some resolver for this, but its not working with splitting: true…

let fakecsspathResolvePlugin = {
    name: 'fakecsspath',
    setup(build) {
        let path = require('path')

        build.onResolve({ filter: /\.esbuild-svelte-fake-css$/ }, ({ path }) => {
            return { path, namespace: 'fakecss' }
        })

        build.onLoad({ filter: /\.esbuild-svelte-fake-css$/, namespace: 'fakecss' }, ({ path }) => {
            const css = cssCode.get(path);
            return css ? { contents: css, loader: "css" } : null;
        })
    },
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
EMH333commented, May 19, 2021

Awesome, glad to hear it!

1reaction
EMH333commented, May 18, 2021

ah! I just realized that you are wanting to automatically import the generated css files from js! You gave the problems you were having but not the expected outcome

esbuild has a few breaking changes that are about to be released that should make this easier. Pretty sure this is now a feature request given that importing the css files from js isn’t something this plugin currently supports. If that isn’t correct please feel free to correct me!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to extract a substring containg "C:\fakepath...." [duplicate]
So I tried the following methods to get the value of the file input.... Used split("\\") mechanism, but it didn't get the result....
Read more >
File Uploads and C:\fakepath - David Walsh Blog
I was recently working on a project that required providing an AJAX uploading widget to users. I decided to use Dojo's dojox.form.
Read more >
path.posix.resolve, path.posix.relative return wrong ... - GitHub
I would like to include @addaleax in this discussion so we don't have to split it and continue parts of it in #13683....
Read more >
ASPxUploadControl client side GetText issue with comma ...
I have implemented a workaround to get the right count of selected files. JavaScript. var files = s.GetText().split(/\s|C:\\fakepath\\/g) ...
Read more >
Solved: ArcGIS REST API: Generate - Page 2 - Esri Community
//Chrome and IE add c:\fakepath to the value - we need to remove it //See this ... getWidth() / map.width; params.generalize = true;...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found