Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
laravel-mix-auto-extract
Advanced tools
Readme
Laravel Mix plugin to auto extract 3rd party dependencies as vendor.js
.
extract()
method which accepts an array of dependencies that you want to extract as vendor.js
node_modules
to vendor.js
file.// app.js
import Vue from 'vue';
import axios from 'axios';
vue
and axios
will be auto extracted to vendor.js
file# npm
npm install laravel-mix-auto-extract --save
# yarn
yarn add laravel-mix-auto-extract
Update your webpack.mix.js
const mix = require('laravel-mix');
// Require this package
require('laravel-mix-auto-extract');
// Your code may go here
// mix.js('./resources/assets/js/app.js', './public/js/app.js')
// mix.version()
// Call this method at last
mix.autoExtract();
Then update your blade template
<script src="{{ mix('js/manifest.js') }}"></script>
<script src="{{ mix('js/vendor.js') }}"></script>
<script src="{{ mix('js/app.js') }}"></script>
Remove any reference to extract()
method in webpack.mix.js
Here are the default options, all of them are optional.
mix.autoExtract({
vendorPath: 'js/vendor', // Don't suffix paths with `.js`
manifestPath: 'js/manifest',
excludeRegExp: /^.*\.(css|scss|sass|less|styl)$/,
generateManifest: true,
});
Paths are relative to the default output directory, usually ./public
.
Don't use autoExtract()
method along with extract()
method.
Please see CHANGELOG for more information what has changed recently.
MIT License
FAQs
Laravel Mix plugin to auto extract 3rd party dependencies as vendor.js.
The npm package laravel-mix-auto-extract receives a total of 43 weekly downloads. As such, laravel-mix-auto-extract popularity was classified as not popular.
We found that laravel-mix-auto-extract demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.