New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

mix-version-replace

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mix-version-replace

webpack plugin updates laravel-mix version ids on files.

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

Webpack plugin to update laravel-mix version ids on static files.

Useful for SPA frontend development with laravel-mix and without platform layout.

#replacement for laravel mix helper function outside of PHP 
<script src="{{ mix("js/app.js") }}"></script>


# install 
$ npm install  --save-dev mix-version-replace


# Usage 

#in webpack.mix.js

const MixVersionReplace = require('mix-version-replace');

mix.webpackConfig({
    ...
    plugins: [
        new MixVersionReplace({
            files: [
                'public/**/*.html',
                'public/**/*.php'
            ],
            mixManifest: 'public/mix-manifest.json',
        })
    ]
})
 
 
# in webpack.config.js

const MixVersionReplace = require('./lib/mix-version-replace');

module.exports = {
    ...
    plugins: [
        new MixVersionReplace({
            files: [
                'public/**/*.html',
                'public/**/*.php'
            ],
            mixManifest: 'public/mix-manifest.json',
        })
    ]
}

Keywords

webpack

FAQs

Package last updated on 27 Dec 2020

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