New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

django-apps-webpack-alias

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

django-apps-webpack-alias

Automatically discovery django apps folder and create webpack alias for them with the app name

  • 1.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Django Apps Webpack Alias

Open Source Love license js-semistandard-style package version install size dependecies codecov

Automatically discovery django apps folder and create webpack alias for them with the app name.

Why?

If you need to start using Webpack on a Django organized project it can be a pain. Static files are usually organized per django app, and communication between them using relative paths can soon become messy. This way you can generate Webpack alias for all Django apps automatically and let Webpack handle the messy part for you. If you are using Jest (and you should) also check out django-apps-jest-mapper to follow same naming in both configurations.

Install

npm i -D django-apps-webpack-alias

Running

const djangoAppsAlias = require('django-apps-webpack-alias');

// in webpack alias config just spread it (or Object.assign with other alias entries)
alias: {
    ...djangoAppsAlias({ options })
},

Available options:

  • dir [default 'apps'] path to directory holding the apps (example: path.resolve(__dirname, 'project/apps'))
  • prefix [default '@app:'] each app alias prefix, for instance for auth app it will generate @app:auth

All aliases point to app/static/app/js directory.

License

MIT.

Keywords

FAQs

Package last updated on 08 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc