All Projects → ankurk91 → laravel-mix-auto-extract

ankurk91 / laravel-mix-auto-extract

Licence: MIT license
[DEPRECATED] Laravel Mix v2/3 plugin to auto extract vendor js

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to laravel-mix-auto-extract

laravel-mix-jigsaw
Laravel Mix plugin for Jigsaw.
Stars: ✭ 14 (-46.15%)
Mutual labels:  laravel-mix, laravel-mix-plugin
laravel-mix-tailwindcss
Tailwind CSS wrapper for Laravel Mix.
Stars: ✭ 43 (+65.38%)
Mutual labels:  laravel-mix, laravel-mix-plugin
zzlib
zlib-compressed file depacking library in Lua
Stars: ✭ 44 (+69.23%)
Mutual labels:  extract
crohme-data-extractor
A modified extractor for the CROHME handwritten math symbols dataset.
Stars: ✭ 18 (-30.77%)
Mutual labels:  extract
icoextract
Extract icons from Windows PE files (.exe/.dll)
Stars: ✭ 56 (+115.38%)
Mutual labels:  extract
sage-laravel-mix
🌟 Sage 9 with laravel mix & vuejs
Stars: ✭ 31 (+19.23%)
Mutual labels:  laravel-mix
crittr
High performance critical css extraction with a great configuration abilities
Stars: ✭ 39 (+50%)
Mutual labels:  extract
ZeeArchiver
Zee is an efficient and simple to use Android Archiver and decompressor. It can decompress and compress from-to all the formats supported by the well known 7zip utility. Copyright © 2018 Mahmoud Galal , for support contact me:[email protected]
Stars: ✭ 35 (+34.62%)
Mutual labels:  extract
adonisjs-laravel-mix
An AdonisJs fullstack application blueprint with Laravel Mix
Stars: ✭ 17 (-34.62%)
Mutual labels:  laravel-mix
creds harvester
Password Recovery Toolkit For Windows Written in Python 3
Stars: ✭ 16 (-38.46%)
Mutual labels:  extract
CRUD-Laravel-Livewire-SPA
CRUD Laravel 7 & Livewire (SPA) Single Page Application
Stars: ✭ 34 (+30.77%)
Mutual labels:  laravel-mix
CVparser
CVparser is software for parsing or extracting data out of CV/resumes.
Stars: ✭ 28 (+7.69%)
Mutual labels:  extract
GeoParser
Extract and Visualize location from any file
Stars: ✭ 48 (+84.62%)
Mutual labels:  extract
colorama
A Gem for extracting the most prevalent colors from an image
Stars: ✭ 20 (-23.08%)
Mutual labels:  extract
video-subtitle-extractor
视频硬字幕提取,生成srt文件。无需申请第三方API,本地实现文本识别。基于深度学习的视频字幕提取框架,包含字幕区域检测、字幕内容提取。A GUI tool for extracting hard-coded subtitle (hardsub) from videos and generating srt files.
Stars: ✭ 1,763 (+6680.77%)
Mutual labels:  extract
sypht-golang-client
A Golang client for the Sypht API
Stars: ✭ 33 (+26.92%)
Mutual labels:  extract
R3ditor
An open-source project created to reverse-engineering some Resident Evil 3 files
Stars: ✭ 19 (-26.92%)
Mutual labels:  extract
asset-mix
Provides helpers functions for CakePHP to use Laravel Mix.
Stars: ✭ 27 (+3.85%)
Mutual labels:  laravel-mix
laravel-react-boilerplate
Laravel React Boilerplate with Ant Design, Route-Level Code Splitting, Redux, Sanctum Auth
Stars: ✭ 49 (+88.46%)
Mutual labels:  laravel-mix
ScrapeM
A monadic web scraping library
Stars: ✭ 17 (-34.62%)
Mutual labels:  extract

Laravel Mix Auto Extract Vendors Plugin

downloads npm-version github-tag license

Laravel Mix plugin to auto extract 3rd party dependencies as vendor.js.

📣 Notice: This feature has been added to Laravel Mix v4.0 now. 🎉

What was the problem?

  • Laravel Mix already has a extract() method which accepts an array of dependencies that you want to extract as vendor.js
  • Whenever you install a new package, you also need to update this list to make it work.
  • Read more on this issue

How does this plugin solve above issue?

  • This plugin will auto extract all js dependencies coming from node_modules to vendor.js file.
  • You just need to reference them in your code somewhere. For example:
// app.js
import Vue from 'vue';
import axios from 'axios';
  • Now vue and axios will be auto extracted to vendor.js file

Requirements

Installation

# npm
npm install laravel-mix-auto-extract --save

# yarn
yarn add laravel-mix-auto-extract

Usage

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

Configuration Options

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.

⚠️ Caution

Don't use autoExtract() method along with extract() method.

Changelog

Please see CHANGELOG for more information what has changed recently.

License

MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].