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.

postcss: empty "Exports Analysis"

See original GitHub issue

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
pastelskycommented, Jan 24, 2021

Sorry but I haven’t found the time to read through type: module and exports specifications. This plus the mjs stuff just makes it very complicated for tools that have to support both module resolution mechanisms. Could someone here who understand this better than me summarize what a tool like bundlephobia would have to do to —

  1. Recognize reliably that for packages using exports, if an ESM version is shipped.
  2. Be able to refer to the right export path for deriving named exports etc (looks like an upgrade to Webpack 5 will be a necessity)

I’m not sure I’d want bundlephobia to switch to Webpack 5 yet, as it appears that the ecosystem around Webpack 5 isn’t mature. For eg. there is still no stable version of Webpack Dev Server that works with Webpack 5 (so many months after W5 release).

0reactions
astoilkovcommented, Jan 21, 2021

I found out more about this issue. It seems the module field points to a directory that is written with ESM. However, my repo code is inside the root directory and I don’t have any idea what to set as a value for module.

Things I tried but didn’t work:

  • "module": "" (Bundle Phobia doesn’t recognize it as ES module)
  • "module": "." (causes a Build Error)

The different versions are here: https://github.com/astoilkov/use-local-storage-state/releases. You can experiment with them by growing Bundle Phobia.

Read more comments on GitHub >

github_iconTop Results From Across the Web

postcss/postcss: Transforming styles with JS plugins - GitHub
PostCSS is a tool for transforming styles with JS plugins. These plugins can lint your CSS, support variables and mixins, transpile future CSS...
Read more >
postcss-export-vars - npm Package Health Analysis - Snyk
PostCSS plugin to export variables definitions as JSON or JS constants. It detect "custom variables" and SASS style variables and export them to ......
Read more >
How is the equivalent of 'module.exports = {};' in es6 for ...
I am running postcss-loader without postcss.config.js and I did not need any dirty hacks. – zerkms. Apr 18, 2017 at 0:34.
Read more >
So you want to make a PostCSS plugin - CSS-Tricks
Build code that is short, simple, clear, and modular. I have a cool idea for an PostCSS plugin. There are more than 200...
Read more >
postcss | Yarn - Package Manager
PostCSS is a tool for transforming styles with JS plugins. These plugins can lint your CSS, support variables and mixins, transpile future CSS...
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