simonihmig / ember-cli-bundle-analyzer

Analyze the size and contents of your Ember app's bundles
MIT License
99 stars 2 forks source link

unable to ignore faker.js from output #14

Closed mehulkar closed 5 years ago

mehulkar commented 5 years ago

I'm using ember-cli-mirage and the biggest thing in my bundle analysis in vendor.js shows faker.js. I'd like to ignore it, since it doesn't go into production, but the ignore feature doesn't seem to be working. I've tried:

const app = new EmberApp(defaults, {
'bundle-analyzer': {
        // ignore: ['faker/**/*.js'],
        // ignore: ['faker'],
        // ignore: ['faker.js'],
        // ignore: 'faker'
    }
})

It's very possible I'm just using it wrong, let me know if this is a better question for StackOverflow or if I am misunderstanding the ignore feature.

simonihmig commented 5 years ago

It has to match against the full path of the module, as it is shown in the analyzer output (i.e. including its parent blocks). So something like vendor/faker/faker.js or so (not sure how the actual path may be). So either specify the full path, or something like **/faker.js might also work!?

simonihmig commented 5 years ago

Sorry for the late answer btw!

NullVoxPopuli commented 4 years ago

It seems I'm unable to ignore

ENOENT: no such file or directory, open '/tmp/tmp-48418rOAT62azHVSa/2-vendor.js/home/psego/Development/Work/the-app/node_modules/three/examples/js/renderers/Projector.js'

I'v tried all of the suggestions above, except an absolute path, because this path changes with every build.

ignore: [
  '*jector.js',
  '**/Projector.js',
  '*/three/examples/js/renderers/Projector.js',
  '**/three/examples/js/renderers/Projector.js',
]