Skip to content
This repository has been archived by the owner on Jun 17, 2021. It is now read-only.

Webpack bundle paths in toolbox.json - format is not consistant with other configs #16

Open
tonifisler opened this issue Aug 21, 2018 · 0 comments

Comments

@tonifisler
Copy link
Member

I joyfully set up the multiple Webpack bundles configuration like this:

  "bundles": {
    "js": [
      {
        "name": "credit",
        "src": "web/themes/wd/assets/components/molecules/credit/credit.js"
      },
      {
        "name": "app",
        "src": "web/themes/wd/assets/components/base.js"
      }
    ]
  }

And the build doesn't crash anything and just continues building the app bundle as if nothing was wrong.

I should have written a path relative to the src value:

  "bundles": {
    "js": [
      {
        "name": "credit",
        "src": "components/molecules/credit/credit.js"
      },
      {
        "name": "app",
        "src": "components/base.js"
      }
    ]
  }

Since all the paths in toolbox.json are written from the project root, I never imagined that was the wrong thing to do:

  "images": [
    "web/themes/wd/build/images/**/*"
  ],

So, we should either keep it like this (and then document why the path is relative to src), or change this to be consistent with the rest of the config. Cheers!

@tonifisler tonifisler changed the title Webpack bundle paths in toolbox.json Webpack bundle paths in toolbox.json - format is not consistant with other configs Aug 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant