stealjs / steal-tools

Build easy. Load fast.
https://stealjs.com/docs/steal-tools.html
MIT License
67 stars 23 forks source link

deps bundle gets tree shaken #1044

Closed pYr0x closed 6 years ago

pYr0x commented 6 years ago

in development you didn't want hundert of files been loaded by steal. therefore development-bundles came. but something like this:

async function buildDependenciesBundle() {
  return stealTools.bundle({
    main: project+"/web/main",
    config: path.join(__dirname, "package.json!npm")
  }, {
    dest: path.join(__dirname, "/assets/js"),
    filter: "node_modules/**/*",
    treeShaking: false
  });
}

didnt work.

in my main.js i have one line import "can"; in development-bundles tree shaking should be turned off by default and should not remove any "dead" code

matthewp commented 6 years ago

That makes sense... I wonder why the dev bundle tests are passing though...

matthewp commented 6 years ago

PR: https://github.com/stealjs/steal-tools/pull/1048