Closed TimBailey-pnk closed 4 years ago
I've got this is in my bundles.js, and tried a few dozen combinations.....
"includes": [
"locales/**/*.json!json"
],
"options": {
"inject": false,
"minify": true,
"depCache": false,
"rev": true
}
},```
Hi @ahmedshuhel any suggestions on this one.
Thanks Tim
@TimBailey-pnk Your snippet looks fine. We are doing:
'app-bundle': {
includes: [
'[./src/app/**/*.js]',
'./src/app/**/*.html!text',
'./src/styles/**/*.css!css',
'./src/translations/**/*.json!json',
...
and it does work. I do note that we are using ./
, but not sure if it makes a difference.
Are your sure that they are not part of your bundle? Do you have the json plugin ("json": "github:systemjs/plugin-json@~0.3.0"
) in your package.json?
Thanks for the reply, I do have the json plugin installed, the 2 differences I can see are that your translations are "under" src whereas mine are at the root, and your translations are going in the main app bundle where I want mine in a seperate (or many seperate) bundles Cheers
@TimBailey-pnk Do you get any error? Your configuration looks good to me. Just check if the path is correct relative to baseURL
.
I don't get any errors, but i don't get a bundle either. I think its because the baseURL is pointing to /src so trying to make a relative path that pops out of /src just wont work whatever I try.
Closing this issue. The aurelia-bundler
library has been superseded by the aurelia-cli.
Hi, done a bunch of googleing and cant find a way to create a bundle that only contains .json files. Background: I'm using Aurelia-i18n and have a folder with the translation files ie
/locales/en/root.json
etc I want to have a hashed bundle with all these files inside. ie app-locales-abcdef123.js I know how to load from text/json files using SystemJS, but how to get them into a bundle just cant get it to work.Any tips please?