Comments (4)
At this early stage in the project, I value the time saved by using well-maintained deps (I can trust that rimraf is built correctly) over a small number of extra dependencies added (in the case of rimraf, 12).
Closing this issue until we hit v1.0, after which we will have more time to optimize deps & can revisit.
from snowpack.
I agree with your point that 130 deps seems excessive for what this library does. Most are coming from Rollup. See more here: https://npm.anvaka.com/#/view/2d/%2540pika%252Fweb
The importance of size for a CLI application (installed once, desktop only, run locally) is not the same as the importance of size for a web application (installed for each user, low powered device/connections). I fear you may be missing the point of this library / the problem it is trying to solve: web app size & complexity, not all library/tooling size.
Adding @pika/plugin-bundle-node
to the build pipeline would take us from 130 deps to 0, which would be worth considering.
from snowpack.
Even in the context of the server / node, don't think the size of a devDependency should matter that much as it doesn't get installed in a production env.
(BTW, @pika/web doen't even have a API for use in other scripts. Why would you transform it in a "web_module"?)
from snowpack.
First, have a look at the dependency graph you linked. For instance, rimraf is used only once in your code. You can easily replace it with a small function:
// requires: fs, path
function rmdir(dir_path) {
if (fs.existsSync(dir_path)) {
fs.readdirSync(dir_path).forEach(function(entry) {
var entry_path = path.join(dir_path, entry);
if (fs.lstatSync(entry_path).isDirectory()) {
rmdir(entry_path);
} else {
fs.unlinkSync(entry_path);
}
});
fs.rmdirSync(dir_path);
}
}
And so on.
I proposed to transform @pika/web through @pika/web just to make it a single script to run with node.js, so that it would stick to your main idea of minimizing dependencies, but @pika/plugin-bundle-node seems a good option for that.
from snowpack.
Related Issues (20)
- π BUG: Can't quit dev server Win11 HOT 2
- π‘ RFC: Option to skip esbuild transform
- π BUG: hmr-client.js fails to load when inside of a srcdoc iframe
- Install snowpack for development failed. HOT 2
- π‘ RFC: Allow acess to hmr engine websocket service
- π BUG: [esinstall] duplicate export 'default' react
- π BUG: dev server fails with "Uncaught TypeError: require$$0 is not a function" due to incorrect require() transform
- π BUG: esinstall: πPutout support
- AMD requirejs module support (or docs on how to ..)
- π BUG: Skypack build fails if using modern JS features
- π BUG: `index.bin.js` file is mistaken as Trojan by Kaspersky and got deleted HOT 2
- π‘ RFC: Setting to hide deprecated options in the docs
- π BUG: default export problem
- π BUG: problem with default export / import in some cases HOT 1
- π BUG:
- π BUG: Snowpack can't find /src/index.jsx no matter what I do? HOT 1
- π BUG: Can't transpile files with new ES features such as optional chaining and private class fields
- π BUG: vm2 has been discontinued and has a critical vulnerability identified
- I can't install a template. HOT 1
- π BUG: Build Result Error: There was a problem with a file build result. [object Object]
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 snowpack.