Component partials
my-component
dist
my-component.js
_js-partials
_partial-1.js
_partial-2.js
my-component.js
Each .js file
that you write in a component will generate a .js file
in a sibling dist folder
.
If you don’t want that for a certain file, you can tell Gulp that a certain file is a partial, by starting it’s filename with an underscore _
.
It's then the responsibility of another .js file
to include that _[partial-name].js file
, otherwise Drupal will never load in the code you've written in that partial.