Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build.json file is empty #24

Open
natewoodbridge opened this issue Oct 15, 2018 · 5 comments
Open

build.json file is empty #24

natewoodbridge opened this issue Oct 15, 2018 · 5 comments

Comments

@natewoodbridge
Copy link

Hey,
Using the default config in the README, I get an empty build.json file.

I might being a bit too keen, or if I have not followed the instructions correctly - I know you are going to add some demo code.

Thanks!

I have a file public_html/config-gen.yml:

presets:
  - name: m2
    options:
      bundle_config: file:test/fixtures/bundle-config.yml

And public_html/test/fixtures/bundle-config.yml:

bundles:
  - name: "bundles/main"
    urls:
      - "/"
    children:
      - name: "bundles/product"
        urls:
          - "/test-bracelet/"
        children: []

But when I try and visit (after visiting https://127.0.0.1:8080/ once) https://127.0.0.1:8080/__bs/build.json gives me this:

{
  "generateSourceMaps": true,
  "inline_text": true,
  "optimize": "none",
  "deps": [],
  "map": {},
  "config": {},
  "shim": {},
  "paths": {},
  "modules": [
    {
      "name": "requirejs/require",
      "include": [],
      "exclude": [],
      "create": false
    },
    {
      "name": "bundles/main",
      "include": [],
      "exclude": [
        "requirejs/require"
      ],
      "create": true
    },
    {
      "name": "bundles/product",
      "include": [],
      "exclude": [
        "requirejs/require",
        "bundles/main"
      ],
      "create": true
    }
  ]
}
@shakyShane
Copy link
Contributor

@natewoodbridge it could be your browser cache preventing the requests (I have solutions for this in the works)

I normally visit the site with dev-tools open and 'disable network cache' checked.

@shakyShane
Copy link
Contributor

ohh, actually, if someone could dig up the correct flag for launching chrome with network cache disabled by default, that would be amazing

@tdgroot
Copy link
Contributor

tdgroot commented Nov 12, 2018

My build.json seems to be pretty empty too.

@shakyShane there's a few options for Chrome/Chromium to change cache settings:

I don't know if --disk-cache-dir would do the trick by setting it to /dev/null.

Otherwise, you could set the size to 1 for --disk-cache-size or --media-cache-size.

@prasmussen
Copy link

Check that require.js is loaded from a path that matches this pattern: /static/{version}/frontend/{vendor}/{theme}/{locale}/requirejs/require.js

On my test server it was loaded from /pub/static/... which caused an empty build.json.

@shakyShane
Copy link
Contributor

Hmm, I think we need to make that path configurable - needs moving into the options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants