richardtallent / vite-plugin-singlefile

Vite plugin for inlining JavaScript and CSS resources
MIT License
798 stars 53 forks source link

Option for css minimization target #99

Closed Juratbek closed 1 month ago

Juratbek commented 1 month ago

I am building a samsung app and single html file with all codes is awesome for me

But I can't use all css features because I need to support old TVs

When I style a block with following styles left: 0; right: 0; top: 0; bottom: 0;

it is replacing these styles with inset:0;

I need to disable this or specify the css build target

ineo6 commented 1 month ago

See https://github.com/evanw/esbuild/issues/1925

With vite, you can set cssTarget,ios13 is my config,you can replace by your tv os version.

  build: {
    target: 'es2015',
    cssTarget: ['es2015', 'ios13'],
  },
richardtallent commented 1 month ago

As mentioned above, this is a Vite thing, not a plugin thing.

Juratbek commented 1 month ago

Thank you :)