Comments (8)
This would solve the problem and support more than path
. However, need to wait for an official release. https://github.com/snowpackjs/rollup-plugin-polyfill-node
from packemon.
@kaleidawave Before I dive into this, are you using the ESM files directly in the browser, or through a bundler?
from packemon.
@milesj Directly in the browser. Ideally packemon
will be used as the only build tool for this project.
path-browserify
is the node path mirror package that I am looking at import path from "path"
being bundled/swapped in for under browser builds. I think the path is the only nodejs lib that needs polyfilling as others are not relevant for browser environment. 👍
from packemon.
Awesome that's fine. I will replace the path lib with the path-browserify
module for the meantime
from packemon.
@kaleidawave This should work in v0.11. Not sure of the quality of the polyfills though.
Also improved generator support.
from packemon.
Thank you for adding this!! Will try it out tomorrow 👍
from packemon.
Yep just tried it out. The node and web builds are working perfectly. 😁. Will try it out in the original project
from packemon.
Awesome, glad to hear!
from packemon.
Related Issues (20)
- `packemon build` doc is outdated? HOT 1
- `packemon build` set the wrong `main` field HOT 3
- Unable to use `PackageValidator` for non-packemon packages HOT 2
- Bug: `transform-react-jsx currently only accepts useBuiltIns or useSpread but not both` HOT 1
- Bug: subpaths for `lib` format are not generated properly HOT 5
- Bug: Assets are not being bundled properly when using esm bundle format HOT 7
- Bug: `native` platform exports are pointing to the incorrect files when also building `node` HOT 5
- Bug: browser condition block in exports is missing default HOT 6
- Bug: types not added to export map for tsx input files HOT 3
- .packemon.js config file naming no longer supported HOT 2
- Transpile without rolling up to index.js HOT 2
- ENOENT: no such file or directory, open /apps/web/package.json' HOT 1
- Add option for babelHelpers to be runtime instead of bundled HOT 2
- TypeScript library with `"type": "module"` generating `cjs` declarations with `.d.ts` suffix HOT 6
- Babel Error: `@babel/plugin-proposal-private-property-in-object ` explicit dependency HOT 5
- any way to add rollup plugins? HOT 2
- Sourcemaps don't seem to be generated correctly
- clean command is not working HOT 1
- "helpers" feature not removing babelHelpers HOT 2
- [Docs] Meaning of directory name colors of `npx packemon files` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from packemon.