basedir doesn't like relative paths up the tree?
See original GitHub issueFor example, when I use ./app
as my baseDir
:
gulp.task('browser-sync', function() {
browserSync.init(["app/*.css", "app/js/*.js"], {
server: {
baseDir: "./app"
},
});
});
I can’t reference directories up the tree, resulting in a 404. Is there a workaround?
<script src="../bower_components/angular-route/angular-route.min.js"></script>
I mean, I get that it’s not a natural server behavior to up the tree, so maybe I should just move the bower_components
into the /app
directory and shut up. 😃
Issue Analytics
- State:
- Created 9 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
java - Why am I receiving an error when trying to create the ...
I am receiving the error "A file path that is implicitly relative to the current working directory is not allowed in the database...
Read more >"find" output relative to directory - Unix & Linux Stack Exchange
I'd like to use find to list all files and directories recursively in a given root for a cpio operation. However, I don't...
Read more >pathlib — Object-oriented filesystem paths — Python 3.11.1 ...
Represent the path as a file URI. ValueError is raised if the path isn't absolute. Return whether or not this path is relative...
Read more >Documentation - Module Resolution - TypeScript
For non-relative module imports, however, the compiler walks up the directory tree starting with the directory containing the importing file, trying to locate ......
Read more >Path Operations - Essential Java Classes - Oracle Help Center
You can think of the Path as storing these name elements as a sequence. ... note that normalize doesn't check at the file...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I know this post is old, but I made it with this configuration:
baseDir
has mynode_modules
folder andapp
folder has myindex.html
file.In my
index.html
file thescript
tag looks like this:<script src='../node_modules/<path_to_file>'></script>
For anyone that lands on this thread - you can now do this by using the
routes
option on the server.