mix.js('src/app.js', 'js');
mix.sass('src/app.scss', 'css');
mix.js('src/app.js', 'js')
.sass('src/app.scss', 'css');
mix.js('src/app.js', 'js')
.sass('src/app.scss', 'css')
.setPublicPath('dist');
mix.postCss('src/app.css', 'dist', [
require('postcss-custom-properties')
]);
mix.js('src/app.js', 'js')
.version();
Once compiled, the hash can be retrieved from your mix-manifest.json
file.
mix.js('src/app.js', 'js')
.vue();
mix.js('src/app.js', 'js')
.vue({ version: 3 });
mix.js('src/app.js', 'js')
.vue({ extractStyles: true });
mix.js('src/app.js', 'js')
.vue({ extractStyles: 'css/vue-styles.css' });
mix.js('src/app.js', 'js')
.react();
mix.js('src/app.js', 'js')
.extract(['lodash']);
mix.js('src/app.js', 'js')
.extract();
mix.js('src/app.js', 'js')
.sourceMaps();
mix.js('src/app.js', 'js')
.autoload({
jquery: ['$', 'window.jQuery']
});
mix.js('src/app.js', 'js')
.sass('src/app.scss', 'css')
.browserSync('http://your-app.test');
Then run npx mix watch
.
// .env
MIX_SOME_KEY=yourpublickey
Only keys in your .env
file that begin with "MIX_" will be loaded.
// webpack.mix.js
mix.js('src/app.js', 'js')
// src/app.js
console.log(
process.env.MIX_SOME_KEY
); // yourpublickey