Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.14 KB | None | 0 0
  1. let mix = require('laravel-mix');
  2.  
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Mix Asset Management
  6. |--------------------------------------------------------------------------
  7. |
  8. | Mix provides a clean, fluent API for defining some Webpack build steps
  9. | for your Laravel application. By default, we are compiling the Sass
  10. | file for your application, as well as bundling up your JS files.
  11. |
  12. */
  13. mix.options({
  14. processCssUrls: false
  15. });
  16. mix.setPublicPath('themes/default/assets');
  17. mix.sourceMaps(true, 'source-map')
  18. .js('themes/default/assets/js/main.js', 'dist/js')
  19. .sass('themes/default/assets/scss/main.scss', 'dist/css');
  20.  
  21. mix.browserSync({
  22. proxy: 'http://127.0.0.1:8000/',
  23. files: ['./themes/default/assets/dist/css/*.css', './themes/default/**/*.htm', './themes/default/assets/dist/js/*.js']
  24. });
  25.  
  26. // Full API
  27. // mix.js(src, output);
  28. // mix.react(src, output); <-- Identical to mix.js(), but registers React Babel compilation.
  29. // mix.preact(src, output); <-- Identical to mix.js(), but registers Preact compilation.
  30. // mix.coffee(src, output); <-- Identical to mix.js(), but registers CoffeeScript compilation.
  31. // mix.ts(src, output); <-- TypeScript support. Requires tsconfig.json to exist in the same folder as webpack.mix.js
  32. // mix.extract(vendorLibs);
  33. // mix.sass(src, output);
  34. // mix.less(src, output);
  35. // mix.stylus(src, output);
  36. // mix.postCss(src, output, [require('postcss-some-plugin')()]);
  37. // mix.browserSync('cmssi.localhost');
  38. // mix.combine(files, destination);
  39. // mix.babel(files, destination); <-- Identical to mix.combine(), but also includes Babel compilation.
  40. // mix.copy(from, to);
  41. // mix.copyDirectory(fromDir, toDir);
  42. // mix.minify(file);
  43. // mix.sourceMaps(); // Enable sourcemaps
  44. // mix.version(); // Enable versioning.
  45. // mix.disableNotifications();
  46. // mix.setPublicPath('path/to/public');
  47. // mix.setResourceRoot('prefix/for/resource/locators');
  48. // mix.autoload({}); <-- Will be passed to Webpack's ProvidePlugin.
  49. // mix.webpackConfig({}); <-- Override webpack.config.js, without editing the file directly.
  50. // mix.babelConfig({}); <-- Merge extra Babel configuration (plugins, etc.) with Mix's default.
  51. // mix.then(function () {}) <-- Will be triggered each time Webpack finishes building.
  52. // mix.override(function (webpackConfig) {}) <-- Will be triggered once the webpack config object has been fully generated by Mix.
  53. // mix.dump(); <-- Dump the generated webpack config object to the console.
  54. // mix.extend(name, handler) <-- Extend Mix's API with your own components.
  55. // mix.options({
  56. // extractVueStyles: false, // Extract .vue component styling to file, rather than inline.
  57. // globalVueStyles: file, // Variables file to be imported in every component.
  58. // processCssUrls: true, // Process/optimize relative stylesheet url()'s. Set to false, if you don't want them touched.
  59. // purifyCss: false, // Remove unused CSS selectors.
  60. // terser: {}, // Terser-specific options. https://github.com/webpack-contrib/terser-webpack-plugin#options
  61. // postCss: [] // Post-CSS options: https://github.com/postcss/postcss/blob/master/docs/plugins.md
  62. // });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement