moyus / laravel-mix-nunjucks

Laravel Mix extension to compile Nunjucks templates
MIT License
11 stars 5 forks source link

Files not compiling #8

Closed meshakeeb closed 3 years ago

meshakeeb commented 3 years ago

Hi,

The files are not compiling if a partial is change. Can you please look into this.

Thanks in advance and thanks for great extension

florianbouvot commented 3 years ago

@moyus did you plan to update your extension?

moyus commented 3 years ago

Is there any bug with Laravel Mix 6?

florianbouvot commented 3 years ago

@moyus it works for me but I need to use --force to install your extension

Capture d’écran 2021-02-25 à 09 10 27

moyus commented 3 years ago

I will fix it tonight, hang on there!

lemonsprites commented 2 years ago

image

Its successful to compile other file, but no nunjuck file get compiled here, I have followed the configuration from the repo but it still doesn't work for me, and I have tried the repo test folder and the result is the same, files aren't compiled.

Here my config file

//> webpack.mix.js

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

require('laravel-mix-nunjucks');

mix.njk('src/views/', 'views/', {
    ext: '.html',
    block: 'konten',
    marked: null,
    watch: true,
    manageEnv: (nunjucks) => {},
})

mix.postCss('src/css/style.css', 'lemonflex.css', [
    require('postcss-import'),
    require('tailwindcss/nesting')('postcss-nested'),
    require('tailwindcss')({
        mode: 'jit',
        content: [
            './src/**/*.{html,js}',
            './dist/**/*.{html,js}'
        ],
        theme: {
            extend: {
                fontFamily: {
                    'sans': ['Noto Sans', 'Heebo', 'sans-serif']
                },
            },
        },
    }),
    require('autoprefixer'),
])

mix.js('src/main.js', 'lemonflex.js')

mix.options({
    fileLoaderDirs: {
        fonts: ''
    },
})
    .disableNotifications()
    .setPublicPath("dist");

is someone know why it haven to me? btw, I just updated Node.js to the latest version before installing this ext. (v16.13.2 => v16.14.2).

moyus commented 2 years ago

@lemonsprites please check whether nunjuck files have been compiled into your output folder, they may not show up in the console but do have been compiled.

lemonsprites commented 2 years ago

Hey thanks for the reply, @moyus . Yeah you right i found it, but it compiled when i watch the file (npx mix watch), and its not compiled when i run for single compile (npx mix). :smiley:

Niksac commented 2 years ago

@moyus I got the same issue as @lemonsprites . When I run npm run mix or npm run mix --production, the Nunjucks files will not compile. When I run npm run mix, the files will compile as expected.

Running version 1.1.0

moyus commented 2 years ago

I will update a new version to fix this problem soon, hang on there!

moyus commented 2 years ago

@lemonsprites I have published a beta version laravel-mix-nunjucks@1.2.0-beta.1, could you please help me test whether it works now?

lemonsprites commented 2 years ago

thanks @moyus , its work properly, and now i can see the compiled file in list its mean a lot for me.😆 image