-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use with Laravel-Mix (outside Laravel) ? #8
Comments
ok ill check 4 u |
hi @la5digital , plz check the project setup & configuration used in this project: php / tailwindcss. // postcss.config.js
module.exports = {
plugins: [
require("tailwindcss")({
}),
require("autoprefixer")({
}),
require("postcss-obfuscator")({
srcPath: "resources", // Source of your files.
desPath: "public", // Destination for obfuscated html/js/.. files.
extensions: ['.html', '.php'],
// cssExcludes: ['resources/scss/icons.scss'],
formatJson: true // Format obfuscation data JSON file.
}),
],
}; "scripts": {
"postcss": "postcss resources/**/*.css --dir public/css"
}, and can you try this: // webpack.mix.js:
const mix = require('laravel-mix');
mix.sass('resources/css/frontend.scss', 'resources/css')
.sass('resources/css/icons.scss', 'resources/css');
mix.js('resources/js/app.js', 'public/js'); |
so it generates |
I've realised the issue. My source style files were .scss instead of .css. |
so is everything working fine now? |
I got it working too by the way, you can do this chain everything in webpack mix instead of separated postcss config and of course exclude scss files: // webpack.mix.js
let mix = require('laravel-mix');
mix.sass('src/css/frontend.scss', 'dist/css')
.sass('src/css/icons.scss', 'dist/css')
.postCss("src/css/tailwind.css", "dist/css", [
require("tailwindcss"),
require("autoprefixer")(),
require("postcss-obfuscator")({
srcPath: "src", // Source of your files.
// desPath: "out", // Destination for obfuscated html/js/.. files.
extensions: ['.html', '.php'],
cssExcludes: ['src/css/icons.scss'],
formatJson: true // Format obfuscation data JSON file.
}),
]);
mix.js('src/js/app.js', 'dist/js'); |
@la5digital if everything works fine plz close the issue. |
@n4j1Br4ch1D My frontend.css is file is basically just main tailwind styling: @tailwind base; The script runs fine now but I've noticed quite a few styles are broken. What is the best approach to diagnose this? |
what exactly is broken? are some css classes not being obfuscated mainly ones declared inside |
All class names are obfuscated but some buttons, general page layout and some other things are not resolving correctly to original styles. |
|
once you realize something odd let me know |
With the following design is still broken: Broken with the following: Works with the following options: Works with the following options: Main issue seems to be with classMethod |
what version are u using? last |
|
plz, provide an example of a broken CSS selector: how it looks. originally and inside |
@la5digital Plz if the new issue isn't related plz close this one and open a new one with and example: an example of a broken CSS selector: how it looks. originally and inside main.json inside css and inside html |
sure, will make a new issue later with more details. |
Hi
The plugin doesn't seem to be updating the respective html/php files. I'm using Laravel-Mix (outside Laravel), PostCSS.
My postcss.config.js file:
Webpack.mix.js:
Project Structure:
package.json scripts:
Tailwind:
The text was updated successfully, but these errors were encountered: