Socket
Socket
Sign inDemoInstall

laravel-mix-environments

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    laravel-mix-environments

Adds mix.inDevelopment() & mix.inTest() to Laravel Mix.


Version published
Weekly downloads
14
increased by366.67%
Maintainers
1
Install size
3.42 kB
Created
Weekly downloads
 

Readme

Source

laravel-mix-environments

Adds mix.inDevelopment() & mix.inTest() to Laravel Mix.

Introduction

laravel-mix-environments is a simple plugin that extends laravel-mix with 2 additional methods.

  • mix.inDevelopment() returns true when NODE_ENV is set to development.
  • mix.inTest() returns true when NODE_ENV is set to test.

Installation

$ npm install laravel-mix-environments

Usage

Inside your webpack.mix.js file, import laravel-mix-environments after importing laravel-mix and start using them.

const mix = require('laravel-mix');
const mixEnvironments = require('laravel-mix-environments');

if (mix.inDevelopment()) {
    // Add webpack configs for development environment here.
}

if (mix.inTest()) {
    // Add webpack configs for test environment here.
}

License

laravel-mix-environments by Yan Sern. This is an open source project released under the MIT License.

PS: I would love to know if you're using laravel-mix-environments. Tweet to me at @yansernio.

Keywords

FAQs

Last updated on 17 Oct 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc