Roots Discourse

Missing dist folder

Hello,

First of all thank you for this great piece of work Sage is.
The problem I have is after running npm/yarn build command, assets are compiled into ‘public’ folder, however there’s no ‘dist’ where I assume all views should go. Obviously then the theme is all blank on production server. Laravel Mix doesn’t throw any errors.

Is there anything I’m missing here?

Thanks,
Lukasz

Hi @lukaszformela,

Welcome to Roots community!

Can you copy your webpack.mix.js file here, please?

Seems you have you changed mix.setPublicPath value.

Cheers.

hey there,

same problem, running build yields no dist to deploy. using sage dev-master branch.

const mix = require('laravel-mix');

require('@tinypixelco/laravel-mix-wp-blocks');

/*

 |--------------------------------------------------------------------------

 | Mix Asset Management

 |--------------------------------------------------------------------------

 |

 | Mix provides a clean, fluent API for defining some Webpack build steps

 | for your Sage application. By default, we are compiling the Sass file

 | for your application, as well as bundling up your JS files.

 |

 */

mix

  .setPublicPath('./public')

  .browserSync('somesitename.local');

mix

  .sass('resources/styles/app.scss', 'styles')

  .sass('resources/styles/editor.scss', 'styles')

  .options({

    processCssUrls: false,

    postCss: [require('tailwindcss')],

  });

mix

  .js('resources/scripts/app.js', 'scripts')

  .js('resources/scripts/customizer.js', 'scripts')

  .blocks('resources/scripts/editor.js', 'scripts')

  .autoload({ jquery: ['$', 'window.jQuery'] })

  .extract();

mix

  .copyDirectory('resources/images', 'public/images')

  .copyDirectory('resources/fonts', 'public/fonts');

mix

  .sourceMaps()

  .version();

Note: You added a “sage9” tag to your post, but you probably mean Sage 10, as this is the release in master branch.

Sage 10 uses a public folder instead of dist.

Related question: