aurelia/templating-resources

css bundled (Failed loading required CSS file)

Closed this issue · 9 comments

Hi,

I get this when i bundle my css (fixUpCSSUrls):
image
the css string is in the "default" property.

maybe it has to do with this
#189

I'm also getting runtime errors for bundling html:
Error: Template markup must be wrapped in a <template> element e.g. <template> <!-- markup here --> </template> at Object.createTemplateFromMarkup (http://localhost:9000/dist/aurelia.js:10292:15) at eval (http://localhost:9000/dist/aurelia.js:12662:42) Error loading http://localhost:9000/dist/common/contact/index.html!template-registry-entry

I didn't really changed the gulp bundling code.

I have the same issue with loading resources registered by config.globalResources https://gyazo.com/ef5c5cd64d4b3a59f2b3a6910aa35204 after bundling

When It will be fixed?

We haven't seen these errors anywhere. We would need a repro to track it down.

@ahmedshuhel Is it possible that the text plugin has changed the way it exports text resources?

Rob, I also ran into these issues when I followed the simple bundling samples in Aurelia's documentation, and can confirm it's related to the text plugin. Installing 0.0.8 breaks bundling, downgrading to 0.0.3 (as used in the samples) fixes the issue.

Check master of loader-default and let me know if this resolves the issue. Based on examining the source of multiple different loader text plugins and versions, I think this should handle the differing approaches.

Firefox console show: "TypeError: plugin.load is not a function" when aurelia attempt load css-resources (that's why error "Failed loading required CSS file" raise).

After some research I found that SO post about that error.

Author found solution in comments to first post:
28 Jul, to dynamically require text requires setting stub:false in the text plugin at aurelia.json > build.loader.plugins.

After change stub value to false in aurelia.json -- work fine for me. Bug is gone and app work correct.