Brad Landis
Brad Landis
NNuxt
Created by Brad Landis on 9/11/2024 in #❓・help
Deploying Nuxt to AWS Amplify from private repo / zip file
I've set up my app to have nitro generate a .amplify-hosting/ directory, which I zip up and then upload to an AWS Amplify app, but it just serves static files and doesn't set up a server. Perhaps this is more of an Amplify question than a Nuxt question, but just wondering if someone has set up Amplify this way before?
7 replies
NNuxt
Created by Brad Landis on 4/25/2023 in #❓・help
Module Development create strongly typed plugin
It's not clear to me how to make my plugin in my module be strongly typed in my project. Is there a module with an example of how to do this well? I submitted a request to nathanchase/dayjs to get this added to their module, and while I think it did work, it doesn't seem to be working right now (and they have another bug, so I can't use their latest version that has this fix). I've added a similar statement in my runtime/plugin.ts file, and it's not resolving when I import the module into a Nuxt app.
2 replies
NNuxt
Created by Brad Landis on 3/31/2023 in #❓・help
Remove styles in a component when unmounted
We have "flavors" that is set based on URL, but in test, we use query string to toggle, but it requires reloading the entire application because styles aren't unloaded once loaded. I have a layouts for each flavor with <style>import '[flavor]/styles';</style> in a component, and when I change to another layout it will load flavorB styles, but doesn't unload flavorA styles that is no longer loaded. How can I unload those styles when the layout gets unmounted?
13 replies
NNuxt
Created by Brad Landis on 2/21/2023 in #❓・help
Where to define typescript enum
Nuxt doesn't like any way I attempt to set up enums. - If I put it in the file in /types/ with the interface, VS Code works great and seems to pick it up, but I get runtime error Uncaught (in promise) ReferenceError: {enumName} is not defined. - I can export and import the enum only, but then my plugin and pages give me errors with Cannot find name {interfaceName} in VS Code when I try to reference it. - If I put the enum in it's own file, the interface can't find it. So I export the enum, and import it into the interface file, but the plugin and pages still give me errors with Cannot find name {interfaceName} in VS Code when I try to reference it. It seems like ./types was meant to contain interfaces only and no import export statements, or things break down.
8 replies