ben-rogerson / laravel-mix-twig-to-html

A Laravel Mix extension to convert Twig files to Html
MIT License
9 stars 6 forks source link

Add a config option to specify output directory #4

Closed sgwebmaster closed 4 years ago

sgwebmaster commented 4 years ago

currently the output directory can't be set using the config object. It would be a lot useful if we can configure the output directory to something like dist.

ben-rogerson commented 4 years ago

hey there!

The output directory is specified with mix. You can specify the output directory in your mix config like this:

// webpack.mix.js

mix.setPublicPath("dist")

require("laravel-mix-twig-to-html")
mix.twigToHtml({
    ...
})

If you're after a build setup (or better examples of how you can use this mix plugin) perhaps take a look at my agency webpack mix config.