
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
laravel-bundler
Advanced tools
Modern and fast asset building tool for Laravel framework with better defaults.
Modern and fast asset building tool for Laravel framework with better defaults.
:bulb: This package does not work with laravel-mix;
you must remove laravel-mix
before using this one
npm install --save-dev laravel-bundler@^1
Create a resources/js/app.js
file like
// Example: Vue.js v2 with bootstrap
import Vue from 'vue';
// You can import styles like this
import 'bootstrap/dist/css/bootstrap.css'
import RegularComponent from './Regular.vue'
const LazyLoadedComponent = () => import('./HeavyComponent.vue');
new Vue({
el: "#app",
components: {
RegularComponent,
LazyLoadedComponent,
}
});
Create a webpack.config.js
file on your project root and remove webpack.mix.js
if exists.
import webpack from 'webpack'
import {createConfig} from 'laravel-bundler';
import vue2Recipe from 'laravel-bundler/src/recipes/vue-2.js';
export default createConfig({
entry: {
app: './resources/js/app.js',
},
plugins: [
//
],
// Other webpack configs may go here
},
// Include vue v2 recipe
// Dont forget to install required packages by this recipe
vue2Recipe
);
Update your package.json
file
{
"type": "module",
"scripts": {
"dev": "webpack --define-process-env-node-env=development --progress",
"watch": "webpack watch --define-process-env-node-env=development --progress",
"hot": "webpack serve --define-process-env-node-env=development --progress --hot",
"hot:https": "npm run hot -- --https",
"prod": "webpack --define-process-env-node-env=production --progress"
},
"browserslist": [
"> 2%",
"not dead"
],
"babel": {
"presets": [
[
"@babel/preset-env",
{
"bugfixes": true
}
]
],
"plugins": []
}
}
Update your blade template
<!-- header -->
<link href="{{ mix('css/app.css', 'dist') }}" rel="stylesheet">
<!-- footer -->
<script src="{{ mix('js/manifest.js', 'dist') }}"></script>
<script src="{{ mix('js/vendor.js', 'dist') }}"></script>
<script src="{{ mix('js/app.js', 'dist') }}"></script>
Update your .gitignore
file
/public/dist
@babel/preset-env
CSS
and SASS|SCSS
supportsass-embedded
:rocket:autoprefixer
mix-manifest.json
compatible with Laravel's mix()
helper.env
file that are prefixed with MIX_
:wink:These features are not in the plan but can be enabled on demand :man_shrugging:
sass|scss
MIT License
webpack-cli
package to v5.xFAQs
Modern and fast asset building tool for Laravel framework with better defaults.
The npm package laravel-bundler receives a total of 68 weekly downloads. As such, laravel-bundler popularity was classified as not popular.
We found that laravel-bundler demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.