npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@anymud/nuxt-module-alias

v0.1.6

Published

Nuxt.js module to add module alias

Downloads

1,087

Readme

@anymud/nuxt-module-alias

This package addresses an issue where Nuxt 3 modules do not support aliases due to the Jijt environment's inability to respond to tsconfig.json. By leveraging the module-alias package, @anymud/nuxt-module-alias adds the necessary aliases at the very start of your Nuxt project, ensuring smoother development experience with TypeScript support.

Features

  • Easy alias setup for Nuxt 3 projects
  • Supports TypeScript configuration
  • Simplifies project structure management

Installation

You can install @anymud/nuxt-module-alias using npm, pnpm, yarn, or bun. Choose the command corresponding to your package manager:

# npm
npm install @anymud/nuxt-module-alias

# pnpm
pnpm add @anymud/nuxt-module-alias

# yarn
yarn add @anymud/nuxt-module-alias

# bun
bun add @anymud/nuxt-module-alias

Usage

To use @anymud/nuxt-module-alias, add the module to the beginning of the modules array in your nuxt.config.ts file:

export default defineNuxtConfig({
  modules: [
    '@anymud/nuxt-module-alias',
    // Other modules...
  ],
})

This setup ensures that alias resolution is applied before any other module logic, allowing for seamless integration with your project's existing structure.

Sample Output

After setting up @anymud/nuxt-module-alias, you should see output similar to the following, indicating that the aliases have been successfully added:

ℹ Setting up alias ...
✔ Adding alias ~ -> /home/kyle/anymud/src
✔ Adding alias @ -> /home/kyle/anymud/src
✔ Adding alias ~~ -> /home/kyle/anymud
✔ Adding alias @@ -> /home/kyle/anymud
✔ Adding alias assets -> /home/kyle/anymud/src/assets
✔ Adding alias public -> /home/kyle/anymud/src/public
✔ Adding alias cookie -> cookie       
✔ Adding alias #app -> /home/kyle/anymud/node_modules/nuxt/dist/app
✔ Adding alias vue-demi -> /home/kyle/anymud/node_modules/nuxt/dist/app/compat/vue-demi
✔ Adding alias @vue/composition-api -> /home/kyle/anymud/node_modules/nuxt/dist/app/compat/
✔ Alias setup complete
This output verifies that the necessary aliases have been correctly added to your project, simplifying your development workflow.

Configuration

Currently, @anymud/nuxt-module-alias does not require additional configuration. It works out-of-the-box by leveraging your existing tsconfig.json paths. However, future versions may introduce customizable options for enhanced flexibility.

Contributing

Contributions are always welcome! If you'd like to contribute, please follow these steps:

  1. Fork the repository.
  2. Create your feature branch (git checkout -b feature/AmazingFeature).
  3. Commit your changes (git commit -m 'Add some AmazingFeature').
  4. Push to the branch (git push origin feature/AmazingFeature).
  5. Open a Pull Request.

Please make sure to update tests as appropriate.

License

Distributed under the MIT License. See LICENSE for more information.

Acknowledgments

  • Thanks to the Nuxt team for creating an extensible and powerful framework.
  • Appreciation to the creators of module-alias for providing the tooling to make this package possible.

Support

For support, open an issue or submit a pull request. Please describe your problem or contribution as clearly as possible.