parcel@next isn't bundling at all (without further config)
See original GitHub issueπ bug report
parcel
is supposed to be zero-config, but parcel@2
seems to default to βbundling for nodeβ, which isnβt Parcelβs most common purpose (I would guess)
π Configuration (.babelrc, package.json, cli command)
This is the full repro:
npm i webext-options-sync parcel@next --no-save
echo "import 'webext-options-sync'" > source.js
npx parcel build source.js
Old repro
npm init -y
npm i webext-options-sync parcel@next
echo "import 'webext-options-sync'" > source.js
npx parcel build source.js
π€ Expected Behavior
β¨ Built in 1.93s.
dist/source.js.map 61.69 KB 21ms
dist/source.js 18.06 KB 1.62s
The module webext-options-sync
is bundled just like parcel@1
does.
π― Current Behavior
β¨ Built in 2.06s.
index.js 31 B 95ms
βββ source.js 75 B 964ms
It generates index.js
with this content:
require("webext-options-sync");
π Possible Solution
Default to regular bundling for browsers, rather than generating a CommonJS file.
π Your Environment
Software | Version(s) |
---|---|
Parcel | 2.0.0-alpha.3.2 |
Node | v12.14.1 |
npm/Yarn | 6.13.4 |
Operating System | macOS 10.15.2 |
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Parcel2 v. Webpack - parcel bundle size is significantly larger
The main driver seems to be that this optimization that the library authors made is picked up by webpack but not by parcel....
Read more >Getting Started With Parcel. Next Generation Web App Bundler
Zero configuration code splitting. Parcel is making sure that the project code is split across multiple bundles if not all assets are needed...
Read more >Parcel-Bundler cannot fix high vulnerabilities - Stack Overflow
Today I was creating a new project and followed all the required steps and when I got to installing Parcel via npm install...
Read more >parcel - npm
Automatically transforms modules using Babel, PostCSS, and PostHTML when needed - even node_modules . βοΈ Zero configuration code splittingΒ ...
Read more >Exploring The Parcel Application Bundler - YouTube
In this video we will take a look at the brand new Parcel bundler which is a little to no configuration application bundler...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Indeed. π
Canβt reproduce anymore
Ah, but that doesnβt happen for me?