
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600× Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
laravel-elixir-webpack-official
Advanced tools
This extension brings Webpack support to Laravel Elixir, version 6 and up.
npm install laravel-elixir-webpack-official --save-dev
Similar to Browserify, the webpack
method may be used to compile and bundle ECMAScript 2015 into plain JavaScript.
This function accepts a file, relative to the resources/assets/js
directory, and generates a single bundled file in the public/js
directory:
elixir(function(mix) {
mix.webpack('app.js');
});
To choose a different output or base directory, simply specify your desired paths as the second and third arguments, respectively.
elixir(function(mix) {
mix.webpack('app.js', 'public/dist', 'app/assets/js');
});
This will compile app/assets/js/app.js
to public/dist/app.js
.
If you'd like to leverage more of Webpack's functionality, Elixir will read any webpack.config.js
file in your project root, and factor its configuration into the build process. Alternatively, you may pass your Webpack-specific configuration as the fourth argument to mix.webpack()
.
If you've created a plugin, and need to hook your own Webpack config into Elixir's defaults, add the following to your script:
Elixir.webpack.mergeConfig({
babel: {
presets: ['es2015'],
plugins: ['transform-runtime'],
},
module: {
loaders: [{
test: /\.vue$/,
loader: 'vue'
}]
}
});
Elixir.webpack.mergeConfig(newConfig)
will recursively merge your provided configuration with ours. It also properly merges any nested arrays, so as not to override important default configuration. For example, in the code snippet above, the addition of the Vue loader will not overwrite the default loaders that we provide.
FAQs
Laravel Elixir Webpack integration
The npm package laravel-elixir-webpack-official receives a total of 432 weekly downloads. As such, laravel-elixir-webpack-official popularity was classified as not popular.
We found that laravel-elixir-webpack-official 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
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.