Skip to content

Instantly share code, notes, and snippets.

@autorunman22
Last active March 25, 2022 02:49
Show Gist options
  • Save autorunman22/4d347acf59e2036dfd552872c8c097e3 to your computer and use it in GitHub Desktop.
Save autorunman22/4d347acf59e2036dfd552872c8c097e3 to your computer and use it in GitHub Desktop.
Laravel common mix setup for vue.js + pug.js
const mix = require('laravel-mix');
mix.webpackConfig({
module: {
rules: [
{
test: /\.pug$/,
loader: 'pug-plain-loader'
}
]
}
});
mix.browserSync('http://localhost:8000/');
mix.js('resources/js/app.js', 'public/js')
.vue()
// .sass('resources/sass/app.scss', 'public/css')
.postCss('resources/css/app.css', 'public/css', [
require('tailwindcss'),
]);
@autorunman22
Copy link
Author

autorunman22 commented Apr 15, 2021

npm install -D pug pug-plain-loader

tailwind.config.js

module.exports = {
    purge: [
        './storage/framework/views/*.php',
        './resources/**/*.blade.php',
        './resources/**/*.js',
        './resources/**/*.vue',
    ],
    darkMode: false, // or 'media' or 'class'
    theme: {
        extend: {
            colors: {
                accent: '#26b6d9',
                secondary: '#066AE0',
                darkKnight: '#3C5572',
            }
        },
        fontFamily: {
            'sans': ['Nunito', 'Arial', 'sans-serif'],
        },
    },
    variants: {
        extend: {},
    },
    plugins: [],
    separator: '_',
}

@autorunman22
Copy link
Author

tsconfig.js

module.exports = {
    resolve: {
      alias: {
        '@': 'src'
      }
    }
  }

@autorunman22
Copy link
Author

stylelint.config.js

module.exports = {
    extends: ["stylelint-config-standard"],
    rules: {
      "at-rule-no-unknown": [
        true,
        {
          ignoreAtRules: [
            "tailwind",
            "apply",
            "variants",
            "responsive",
            "screen",
          ],
        },
      ],
      "declaration-block-trailing-semicolon": null,
      "no-descending-specificity": null,
    },
  };
  

@autorunman22
Copy link
Author

install wsl plugin -__-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment