Comments (6)
hi luke,
thx for the great feedback... After deleting my project folder, I understood we're talking about 2 different things 😊 (sorry about me being unclear 🙄 )
I will check out your hints asap (not today, as it's pretty late here)...
Maybe you want to add some of these hints to your readme. Or - even better IMO - put a 'pwa.config.js' file into the repo, so people (like me) get a hint, there are options....
Anyway - I appreciate your responsiveness pretty much and I'm looking forward how things work out...
Thx again!!
from pwa.
You should be able to just do --dest <target>
on either your build
or export
commands.
$ pwa export --dest foobar
# => foobar/index.html
# => foobar/about/index.html
# => etc
from pwa.
Did you try?
I tried
$ pwa export --dest .
and it deleted the whole project 😱
from pwa.
Also: the paths generated are not relative.... they always point to the absolute path (starting with a '/')
<link rel="shortcut icon" href="/assets/favicon.png" /> <link rel="manifest" href="/assets/manifest.json" /> <link href="/bundle.7c264.css" rel="stylesheet" />
from pwa.
Ah, I misunderstood you – sorry. The --dest
flag changes where the build files are placed. It also clears the existing/previous files to ensure it's a clean build. I hope you were able to recover your files!
As for relative pathing, that's controlled by webpack's output.publicPath
config. It is /
by default (in both PWA and webpack).
To change it, you do this:
// pwa.config.js
exports.webpack = function (config) {
config.output.publicPath = './'; // or whatever you want
}
That will update all the webpack-controlled asset pathing.
In the snippet you pasted above, that means that (only) /bundle.7c264.css
will become ./bundle.7c264.css
.
To change the /assets/favicon.png
and /assets/manifest.json
you have to manually change those in your src/index.html
– which PWA scaffolded for you during init
phase.
I've tested the above config & made the changes to src/index.html
's meta tags. All works as you've requested.
You do not need the --dest
flag – sorry for misunderstanding the question initially.
Hope that helps!
from pwa.
I think it was mostly my fault, not to worry!
I'm trying to set aside some time to do another sprint of PWA changes. It hasn't been super high on my list lately, simply because it works reliably for my needs now. ...But I definitely need to make sure the documentation is up to par & that the tools that others use are supported.
from pwa.
Related Issues (20)
- Irrelevant question HOT 1
- Creating a project with just 'less' preprocessor throws an error HOT 1
- PWA command not found on local install HOT 2
- Add push notifications and things mentioned in here
- How do I deloy on a heroku server? HOT 2
- how could I contribute translation for this project? HOT 2
- Service Worker
- Feature Request - Init into existing Project HOT 1
- React Installed brand new, not working straight up. HOT 5
- Config for supplying own service worker file
- npm i missing from docs
- Help, how to remove .svelte file from browser source HOT 3
- Duplicated App in svelte production HOT 2
- Create sub-folder in pages folder [Svelte] HOT 2
- @pwa/plugin-typescript is not published HOT 2
- Custom postcss webpack style rules missing with pwa.config.js HOT 8
- Handle LauncherError exception HOT 4
- When you say "WIP" what does that mean? HOT 2
- pnpm install
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 pwa.