aurelia / bundler

A library for bundling JavaScript, HTML and CSS for use with SystemJS.
MIT License
37 stars 25 forks source link

Not bundling properly when adding a shim for CSS files in JSPM #168

Closed justindra closed 4 years ago

justindra commented 7 years ago

I'm submitting a bug report

Please tell us about your environment:

Current behavior: Adding a shim to package.json under jspm overrides for flatpickr

     "npm:flatpickr@4.0.6": {
        "registry": "jspm",
        "main": "dist/flatpickr",
        "dependencies": {
          "css": "*"
        },
        "shim": {
          "dist/flatpickr": [
            "./flatpickr.css!"
          ]
        }
      }

When I add this in, then I am receiving an error on runtime of Cannot read property 'get' of undefined. Upon further inspection this is because System.registry is undefined. It looks like there is a mismatch between the bundler choosing the latest SystemJS Syntax and the actual SystemJs being loaded in.

Weirdly only happens when I add that shim for CSS. If I remove the override, all is well and there seems to be no problems at all.

justindra commented 7 years ago

Downgrading to Aurelia Bundler 0.5.0 fixes the issue for the time being.

m-gallesio commented 5 years ago

This also happens if SystemJS's plugin-css is installed as of 0.7.0. Again, 0.5.0 works fine.

EisenbergEffect commented 4 years ago

Closing this issue. The aurelia-bundler library has been superseded by the aurelia-cli.