webpack.mix.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. const mix = require('laravel-mix');
  2. /*
  3. |--------------------------------------------------------------------------
  4. | Mix Asset Management
  5. |--------------------------------------------------------------------------
  6. |
  7. | Mix provides a clean, fluent API for defining some Webpack build steps
  8. | for your Laravel applications. By default, we are compiling the CSS
  9. | file for the application as well as bundling up all the JS files.
  10. |
  11. */
  12. mix.js('resources/js/app.js', 'public/js')
  13. .postCss('resources/css/app.css', 'public/css', [
  14. require("tailwindcss"),
  15. require("autoprefixer"),
  16. ]);
  17. // mix.js(`public/themes/pro/${process.env.PRO_THEME}/resources/js/bundle.js`, `public/themes/pro/${process.env.PRO_THEME}/resources/js/app.js`)
  18. // .react();
  19. const NodePolyfillPlugin = require("node-polyfill-webpack-plugin")
  20. mix.webpackConfig(webpack => {
  21. return {
  22. plugins: [
  23. new NodePolyfillPlugin(),
  24. ]
  25. };
  26. })
  27. mix.browserSync({
  28. proxy: {
  29. target: 'http://localhost:8000',
  30. },
  31. files: ['./resources/**/*', './public/**/*'],
  32. open: false,
  33. });