Skip to content
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

In lib mode, the minifier setting does not work properly #5471

Closed
7 tasks done
Sak32009 opened this issue Oct 29, 2021 · 1 comment · Fixed by #7807
Closed
7 tasks done

In lib mode, the minifier setting does not work properly #5471

Sak32009 opened this issue Oct 29, 2021 · 1 comment · Fixed by #7807

Comments

@Sak32009
Copy link

Describe the bug

When in development mode you set build.minify to false, the css style inside the code is minified, while when in production mode the code is not minified.

Reproduction

https://github.com/Sak32009/GetDLCInfoFromSteamDB/

System Info

System:
    OS: Windows 10 10.0.22000
    CPU: (12) x64 AMD Ryzen 5 2600 Six-Core Processor
    Memory: 10.59 GB / 15.93 GB
  Binaries:
    Node: 16.10.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 7.24.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.22000.120.0), Chromium (95.0.1020.30)
    Internet Explorer: 11.0.22000.120
  npmPackages:
    vite: ^2.6.13 => 2.6.13

Used Package Manager

yarn

Logs

vite:config bundled config file loaded in 186.84ms +0ms
  vite:config using resolved config: {
  vite:config   root: 'C:/Users/sak32/Documents/GitHub/GetDLCInfoFromSteamDB/src',
  vite:config   plugins: [
  vite:config     'alias',
  vite:config     'vite:modulepreload-polyfill',
  vite:config     'vite:resolve',
  vite:config     'vite:html-inline-script-proxy',
  vite:config     'vite:css',
  vite:config     'vite:esbuild',
  vite:config     'vite:json',
  vite:config     'vite:wasm',
  vite:config     'vite:worker',
  vite:config     'vite:asset',
  vite:config     'metablock',
  vite:config     'vite:define',
  vite:config     'vite:css-post',
  vite:config     'vite:build-html',
  vite:config     'commonjs',
  vite:config     'vite:data-uri',
  vite:config     'rollup-plugin-dynamic-import-variables',
  vite:config     'vite:asset-import-meta-url',
  vite:config     'vite:build-import-analysis',
  vite:config     'vite:esbuild-transpile',
  vite:config     'vite:reporter',
  vite:config     'vite:load-fallback'
  vite:config   ],
  vite:config   build: {
  vite:config     target: 'esnext',
  vite:config     polyfillModulePreload: true,
  vite:config     outDir: 'C:\\Users\\sak32\\Documents\\GitHub\\GetDLCInfoFromSteamDB',
  vite:config     assetsDir: 'assets',
  vite:config     assetsInlineLimit: 4096,
  vite:config     cssCodeSplit: false,
  vite:config     cssTarget: 'esnext',
  vite:config     sourcemap: false,
  vite:config     rollupOptions: {},
  vite:config     minify: 'esbuild',
  vite:config     terserOptions: {},
  vite:config     write: true,
  vite:config     emptyOutDir: null,
  vite:config     manifest: false,
  vite:config     lib: {
  vite:config       entry: 'C:\\Users\\sak32\\Documents\\GitHub\\GetDLCInfoFromSteamDB\\src\\index.ts',
  vite:config       name: 'sak32009_get_data_from_steam_steamdb_epicdb',
  vite:config       formats: [Array],
  vite:config       fileName: [Function: fileName]
  vite:config     },
  vite:config     ssr: false,
  vite:config     ssrManifest: false,
  vite:config     reportCompressedSize: true,
  vite:config     chunkSizeWarningLimit: 500,
  vite:config     watch: null,
  vite:config     commonjsOptions: { include: [Array], extensions: [Array] },
  vite:config     dynamicImportVarsOptions: { warnOnError: true, exclude: [Array] }
  vite:config   },
  vite:config   configFile: 'C:/Users/sak32/Documents/GitHub/GetDLCInfoFromSteamDB/vite.config.ts',
  vite:config   configFileDependencies: [
  vite:config     'package.json',
  vite:config     'src/metablock.ts',
  vite:config     'src/plugins/metablock/main.ts',
  vite:config     'vite.config.ts'
  vite:config   ],
  vite:config   inlineConfig: {
  vite:config     root: undefined,
  vite:config     base: undefined,
  vite:config     mode: undefined,
  vite:config     configFile: undefined,
  vite:config     logLevel: undefined,
  vite:config     clearScreen: undefined,
  vite:config     build: {}
  vite:config   },
  vite:config   base: '/',
  vite:config   resolve: { dedupe: undefined, alias: [ [Object], [Object] ] },
  vite:config   publicDir: 'C:\\Users\\sak32\\Documents\\GitHub\\GetDLCInfoFromSteamDB\\src\\public',
  vite:config   cacheDir: 'C:\\Users\\sak32\\Documents\\GitHub\\GetDLCInfoFromSteamDB\\node_modules\\.vite',
  vite:config   command: 'build',
  vite:config   mode: 'production',
  vite:config   isProduction: true,
  vite:config   server: { fs: { strict: undefined, allow: [Array] } },
  vite:config   env: { BASE_URL: '/', MODE: 'production', DEV: false, PROD: true },
  vite:config   assetsInclude: [Function: assetsInclude],
  vite:config   logger: {
  vite:config     hasWarned: false,
  vite:config     info: [Function: info],
  vite:config     warn: [Function: warn],
  vite:config     warnOnce: [Function: warnOnce],
  vite:config     error: [Function: error],
  vite:config     clearScreen: [Function: clearScreen],
  vite:config     hasErrorLogged: [Function: hasErrorLogged]
  vite:config   },
  vite:config   createResolver: [Function: createResolver],
  vite:config   optimizeDeps: {
  vite:config     esbuildOptions: { keepNames: undefined, preserveSymlinks: undefined }
  vite:config   }
  vite:config }

Validations

@Sak32009 Sak32009 changed the title In li mode, the minifier setting does not work properly In lib mode, the minifier setting does not work properly Oct 29, 2021
@sapphi-red
Copy link
Member

I checked with a606209de8f9f724ec1e24709358cba1b65d1769 since this is the likely commit you reported.

  • development mode

    • Inside .js: not minified (it is in one line but it is because it is inside ")
    • Inside .css: not minified
  • production mode

    • Inside .js: not minified
    • Inside .css: minified

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants