Comments (7)
This is an interesting one, since I force it to always use import()
unless on the legacy support. https://github.com/milesj/packemon/blob/master/packages/packemon/src/babel/config.ts#L9
Is this using babel or swc?
Will dig into.
from packemon.
Probably, it uses babel? (It will use default transpiler)
However, I've tried to run PACKEMON_SWC=true npm run build
and I get similar output.
https://github.com/azu/packemon-native-dynamic-import/blob/swc/cjs/index.cjs
from packemon.
This is confusing. This is the line in Babel where the call gets transformed: https://github.com/babel/babel/blob/main/packages/babel-plugin-transform-modules-commonjs/src/index.ts#L184
Yet when I debug and log, this line is never called, YET the imports are still being transformed. Either this is a bug in Babel, or something else is going on that I'm not aware of.
from packemon.
from packemon.
Turns out, it's rollup causing this. Digging into further.
from packemon.
This'll fix it: #139
Thanks for the report.
from packemon.
Thanks!
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.