-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Bower component links point to wrong directory #1348
Comments
The same problem occurs using Grunt instead of Gulp. |
Me too. I'm using Gulp though. |
I am also joining my scream to this issue. I use Grunt and I have found the the root of the problem is on the wiredep configuration, by default it has this configuration: // Automatically inject Bower components into the app
wiredep: {
app: {
src: ['<%= yeoman.app %>/index.html'],
ignorePath: /\.\.\//
},
test: {
devDependencies: true,
src: '<%= karma.unit.configFile %>',
ignorePath: /\.\.\//,
fileTypes:{
js: {
block: /(([\s\t]*)\/{2}\s*?bower:\s*?(\S*))(\n|\r|.)*?(\/{2}\s*endbower)/gi,
detect: {
js: /'(.*\.js)'/gi
},
replace: {
js: '\'{{filePath}}\','
}
}
}
}
}, I had to leave the relative path out of the configuration in order to wiredep to find the correct path. Once I have done with all the coding on app I added a dist configuration so that when I run the build task it catches the correct path. // Automatically inject Bower components into the app
wiredep: {
app: {
src: ['<%= yeoman.app %>/index.html'],
exclude: ['/bower_components/html5shiv/dist/html5shiv.js']
},
dist: {
src: ['<%= yeoman.app %>/index.html'],
ignorePath: /\.\.\//,
exclude: ['/bower_components/html5shiv/dist/html5shiv.js']
},
test: {
devDependencies: true,
src: '<%= karma.unit.configFile %>',
ignorePath: /\.\.\//,
fileTypes:{
js: {
block: /(([\s\t]*)\/{2}\s*?bower:\s*?(\S*))(\n|\r|.)*?(\/{2}\s*endbower)/gi,
detect: {
js: /'(.*\.js)'/gi
},
replace: {
js: '\'{{filePath}}\','
}
}
}
}
}, Although this is not the best solution it has allow me to continue my work and finish the project I was working on. |
The same problem. It looks like nobody wants to fix it. It's necessary to link wiredep and useref to correct path specified in .bowerrc. |
Why are you visiting |
Hey,
After running the generator and visiting /app/ you get missing resources, because all bower components seem to be linked to
/app/bower_components/angular/angular.js
/app/bower_components/...
However, the generator directory structure is:
/app/
/bower_components/
Am I missing something here ?
I'm having this "issue" using Gulp, index.html script tags:
In the other hand, if I manually copy the bower_components folder inside the app folder it works perfectly.
The text was updated successfully, but these errors were encountered: