Comments (17)
To be clear: the router in Aurelia 2 doesn't use or require the <base>
tag.
from new.
You are not supposed to put relative path inside <base>
. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
What you have is different issue I think.
from new.
ionic-team/capacitor#1037 I'm open to alternative fixes, since I've provided reproduction steps, but what is currently there does not work
from new.
I think I am wrong about <base>
.
The base URL to be used throughout the document for relative URLs. Absolute and relative URLs are allowed.
But in Aurelia, we have to use absolute path inside <base>
to support routes.
Because inside a front-end route http://localhost/product/1
, <base href="./">
does not work for us.
from new.
If the app and unit tests and cypress tests all work as expected, I guess this repo might not correct place to fix your electron setup. But I have no much experience on electron anyway, I might be wrong.
from new.
The <base href="./">
is not a fix. As I said, it will break Aurelia app with pushState routes, unless @jwx did something different from Aurelia 1.
from new.
pushState (if I understand you correctly) does not work in electron see aurelia/aurelia#852
from new.
But we cannot use your fix because this repo is mainly to support Aurelia app (majority of users will use router), not electron.
from new.
Since you knew why to make your setup work, you can mutate the app after it was generated. I guess simply remove <base>
element will work for you too.
from new.
I'm using router, currently it seems fine, but maybe I don't have the right thing done, I don't have a route like product/1
for example. I see someone also suggesting ''
maybe that is the better fix. I'll try it.
My app needs to support ALL of the platforms and things like product/1
will need to work in all of them.
from new.
My example is for when use click a menu to <a href="another/page">
from /product/1
page, the <base href="./">
will tell browser to route to /product/another/page
(or /product/1/another/page
I am not sure), not /another/page
(<base href="/">
will give that correct result).
You need to test your other base fix for the above case.
from new.
<base href="">
works too, if that's any better
from new.
we can leave this open for now, @jwx has some insight here as well... all I really have right now is that href="/"
causes issues other SPA platforms
curious, what happens if you serve an app root at http://localhost/foo
and you're using /
will that still work correctly?
from new.
I tested <base href="">
in au1, it broke the reload if I reload a page with some route /not/root
, it might be due to I use lots of bare url resources link in my app.
from new.
Let's follow up this issue in the aurelia/aurelia#852, might be an opportunity to remove <base>
from au2's router requirement. Actually I never heard about <base>
tag before using Aurelia.
from new.
I don't actually think that's the right place to discuss this as it confuses the issue, since there are 2 separate issues. In discord I got this from @jwx
Jurgen: Right. So 1) the au2 router doesn't use so that can safely be removed
and doing that works for me
from new.
Great! Let's just remove it!
from new.
Related Issues (20)
- Add support of FuseBox v4 HOT 4
- Binding Syntax Selector
- New project from npx makes fails HOT 2
- Webpack 5 live reload not working HOT 9
- webpack-dev-server v4.0.0-beta.0 broke our CI HOT 1
- Add skeleton for plugin project.
- including static files in build HOT 2
- Error: Cannot access 'CustomElement' before initialization HOT 12
- replace lesslint by stylelint HOT 1
- Add source maps for Typescript projects HOT 2
- TODO: turn on import helpers in transpiling
- TODO: decide a simple default approach for handling assets HOT 1
- Dumber and monorepo HOT 6
- Include favicon.ico HOT 1
- Properly support silent mode HOT 3
- Support default Yarn mode (PnP) properly (version 2.x or higher) HOT 6
- Support Vite HOT 1
- Latest Aurelia build breaks browser test with jasmine/mocha + parcel HOT 3
- DevAliases cause waring/error to be shown in console HOT 3
- Update babel setup for decorator, remove legacy
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from new.