I'm trying to utilize Mean.io for an app I'm making, and I haven't changed basically anything from the original config files and when I launch this app to heroku in production mode, it isn't aggregating the dist files correctly and gives me
"Failed to load resource: the server responded with a status of 404 (Not Found) http://****.herokuapp.com/bower_components/build/css/dist.min.css""
Same applies to the JS file. The related files look as such: Assets.json: {
"core": {
"css": {
"bower_components/build/css/dist.min.css": [
"bower_components/met_theme/global/css/components.css"
]
},
"js": {
"bower_components/build/js/dist.min.js": [
"bower_components/angular/angular.js",
"bower_components/angular-mocks/angular-mocks.js",
"bower_components/angular-cookies/angular-cookies.js",
"bower_components/angular-resource/angular-resource.js",
"bower_components/angular-ui-router/release/angular-ui-router.js",
"bower_components/angular-bootstrap/ui-bootstrap.js",
"bower_components/angular-bootstrap/ui-bootstrap-tpls.js",
"bower_components/met_theme/global/scripts/datatable.js",
"bower_components/met_theme/global/scripts/metronic.js"
]
}
}
}
Within my gruntfile:
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
assets: grunt.file.readJSON('config/assets.json'),
// later on
uglify: {
core: {
options: {
mangle: false
},
files: '<%= assets.core.js %>'
}
},
csslint: {
options: {
csslintrc: '.csslintrc'
},
src: paths.css
},
cssmin: {
core: {
files: '<%= assets.core.css %>'
}
},
I can see this is a production vs development error as if I change the assetmanager object in my express.js file to:
var assets = assetmanager.process({
assets: require('./assets.json'),
debug: process.env.NODE_ENV !== 'development',
webroot: /public\/|packages\//g
});
As opposed to !== 'production' it gives me the same issue locally. I'm not very familiar with this way of loading files and I can't seem to find any solutions so anyone who can offer an answer or point me in the right direction would be much appreciated.