Git Product home page Git Product logo

nimpl-classnames-minifier's People

Contributors

vordgi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

vitaliemiron

nimpl-classnames-minifier's Issues

Error on build

On build I have this error:

17:44:29 #12 0.774 Error: EBUSY: resource busy or locked, rmdir '/app/.next/cache'
17:44:29 #12 0.774 at rmdirSync (node:fs:1229:10)
17:44:29 #12 0.774 at _rmdirSync (node:internal/fs/rimraf:235:5)
17:44:29 #12 0.774 at rimrafSync (node:internal/fs/rimraf:193:7)
17:44:29 #12 0.774 at node:internal/fs/rimraf:253:9
17:44:29 #12 0.774 at Array.forEach ()
17:44:29 #12 0.774 at _rmdirSync (node:internal/fs/rimraf:250:7)
17:44:29 #12 0.774 at rimrafSync (node:internal/fs/rimraf:193:7)
17:44:29 #12 0.774 at Object.rmSync (node:fs:1278:10)
17:44:29 #12 0.774 at validateDist (/app/node_modules/classnames-minifier/dist/lib/validateDist.js:44:22)
17:44:29 #12 0.774 at new ClassnamesMinifier (/app/node_modules/classnames-minifier/dist/ClassnamesMinifier.js:14:40) {
17:44:29 #12 0.774 errno: -16,
17:44:29 #12 0.774 syscall: 'rmdir',
17:44:29 #12 0.774 code: 'EBUSY',
17:44:29 #12 0.774 path: '/app/.next/cache'
17:44:29 #12 0.774 }

Why does it try to remove .next/cache?

Problem with bitbucket pipeline

Hi!

When the minifier detects changes in the configuration, it cleans the build folder (by default this is .next).

In Vercel and localhost it is ok. But our dev pipeline works like this:

  1. on the first machine (bitbucket pipeline) the build occurs.
  2. the build is sent to the second machine (hosting).
  3. on the second machine (hosting) the start occurs.

At the moment of start, the plugin deletes the build folder and we get this:
image

I'm not sure if the plugin does useful work in runtime, or only in buildtime/devtime? If only in buildtime/devtime, is it possible to check this somehow and skip the work when starting the production server (next start)?

problem with global classes

Hey!

First thank you for this package!

I got a problem: in addition to CSS modules, I use a small number of global classes. Specifically, the class of the current locale. These are short two letter classes. Minified classes began to overlap with them quite quickly.

Do you have any options to solve this problem?

I see two potential options:

  1. provide the options to set a disallowlist of minified classes (rude and dangerous).

  2. provide the option to set a prefix and/or postfix, for example, so that all minified classes begin with _.

Fix readme

Next time Next.js will create the "About" page first and those classes will be created for that page, but "Home" page with the same classes will be read from the page

->

Next time Next.js will create the "About" page first and those classes will be created for that page, but "Home" page with the same classes will be read from the cache

Set up advanced caching

Cleaning the build folder every time is too inconvenient; in general, a normal caching mechanism is needed

Refactor classnames minifier

Stop defining every character in the class on every call. The previous characters are already known. The algorithm needs to be optimized.
Add support for numbers

All fonts are mixed when using next/font

Hello, thanks for the useful package!

I have a problem – I'm using several fonts on my Next.js website, especially Geologica and Nunito Sans with several weights. After building app with this package, all the fonts are getting the same className, so every text on the page gets the same font.

This is how it looks in dev tools:
image

Seems like every font overwrites previously created class.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.