I would like to add a "static" directory where to place random files (say file.txt).
Adding "static/**/*" will do half the trick.
However, once built, the file itself will only be reachable via es6-bundled/static/file.txt when linked directly.
Using relative links will obviously work. However, this won't work when an element needs to link to a resource in static/ AND that very same element can be used in different parts of the application at different depth in terms of URL.
Two possible solutions:
1) Add a symlink from the build directory (which will be the root of the served pages, no matter what) to the actual directory
2) Have the app consistently prefix any "absolute" URLs with document.baseURI
Is there a better way to do do this? I am sure I must be missing something... What's the recommended best practice for it?
Hi there,
Thanks for the awesome work.
I would like to add a "static" directory where to place random files (say
file.txt
). Adding"static/**/*"
will do half the trick. However, once built, the file itself will only be reachable viaes6-bundled/static/file.txt
when linked directly. Using relative links will obviously work. However, this won't work when an element needs to link to a resource instatic/
AND that very same element can be used in different parts of the application at different depth in terms of URL.Two possible solutions:
1) Add a symlink from the
build
directory (which will be the root of the served pages, no matter what) to the actual directory2) Have the app consistently prefix any "absolute" URLs with document.baseURI
Is there a better way to do do this? I am sure I must be missing something... What's the recommended best practice for it?