🔧(script): 打包 build 去 注释 console.log debugger
This commit is contained in:
		
							parent
							
								
									23bff375cf
								
							
						
					
					
						commit
						77be989540
					
				@ -24,6 +24,16 @@ export default (): UserConfigExport => {
 | 
			
		||||
        formats: ["es"],
 | 
			
		||||
        fileName: (name) => `index.js`,
 | 
			
		||||
      },
 | 
			
		||||
      terserOptions: {
 | 
			
		||||
        compress: {
 | 
			
		||||
          drop_console: true,
 | 
			
		||||
          drop_debugger: true,
 | 
			
		||||
          pure_funcs: ['console.log']
 | 
			
		||||
        },
 | 
			
		||||
        output: {
 | 
			
		||||
          comments: true
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
      rollupOptions: {
 | 
			
		||||
        output: {
 | 
			
		||||
          globals: {
 | 
			
		||||
 | 
			
		||||
@ -66,6 +66,16 @@ export default (): UserConfigExport => {
 | 
			
		||||
        entry: resolve(process.cwd(), "./src/index.ts"),
 | 
			
		||||
        formats: ["es"],
 | 
			
		||||
      },
 | 
			
		||||
      terserOptions: {
 | 
			
		||||
        compress: {
 | 
			
		||||
          drop_console: true,
 | 
			
		||||
          drop_debugger: true,
 | 
			
		||||
          pure_funcs: ['console.log']
 | 
			
		||||
        },
 | 
			
		||||
        output: {
 | 
			
		||||
          comments: true
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
      rollupOptions: {
 | 
			
		||||
        input: inputs,
 | 
			
		||||
        output: {
 | 
			
		||||
 | 
			
		||||
@ -24,6 +24,16 @@ export default (): UserConfigExport => {
 | 
			
		||||
        formats: ["umd"],
 | 
			
		||||
        fileName: (name) => `index.js`,
 | 
			
		||||
      },
 | 
			
		||||
      terserOptions: {
 | 
			
		||||
        compress: {
 | 
			
		||||
          drop_console: true,
 | 
			
		||||
          drop_debugger: true,
 | 
			
		||||
          pure_funcs: ['console.log']
 | 
			
		||||
        },
 | 
			
		||||
        output: {
 | 
			
		||||
          comments: true
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
      rollupOptions: {
 | 
			
		||||
        output: {
 | 
			
		||||
          globals: {
 | 
			
		||||
 | 
			
		||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										4
									
								
								package/document-layer/dist/index.html
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								package/document-layer/dist/index.html
									
									
									
									
										vendored
									
									
								
							@ -15,8 +15,8 @@
 | 
			
		||||
    <link rel="icon" href="/favicon.ico" />
 | 
			
		||||
    <title>layer-vue 弹层解决方案</title>
 | 
			
		||||
    <!--preload-links-->
 | 
			
		||||
    <script type="module" crossorigin src="/assets/index.1157d8c1.js"></script>
 | 
			
		||||
    <link rel="stylesheet" href="/assets/index.e9614e1e.css">
 | 
			
		||||
    <script type="module" crossorigin src="/assets/index.0df87e64.js"></script>
 | 
			
		||||
    <link rel="stylesheet" href="/assets/index.3f855dd4.css">
 | 
			
		||||
  </head>
 | 
			
		||||
 | 
			
		||||
  <body>
 | 
			
		||||
 | 
			
		||||
@ -20,6 +20,16 @@ export default defineConfig({
 | 
			
		||||
      entry: path.resolve(__dirname, "src/index.ts"),
 | 
			
		||||
      name: camelize(name),
 | 
			
		||||
    },
 | 
			
		||||
    terserOptions: {
 | 
			
		||||
      compress: {
 | 
			
		||||
        drop_console: true,
 | 
			
		||||
        drop_debugger: true,
 | 
			
		||||
        pure_funcs: ['console.log']
 | 
			
		||||
      },
 | 
			
		||||
      output: {
 | 
			
		||||
        comments: true
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    rollupOptions: {
 | 
			
		||||
      output: {
 | 
			
		||||
        exports: "named",
 | 
			
		||||
 | 
			
		||||
@ -21,6 +21,16 @@ export default defineConfig({
 | 
			
		||||
      entry: path.resolve(__dirname, "src/index.ts"),
 | 
			
		||||
      name: camelize(name),
 | 
			
		||||
    },
 | 
			
		||||
    terserOptions: {
 | 
			
		||||
      compress: {
 | 
			
		||||
        drop_console: true,
 | 
			
		||||
        drop_debugger: true,
 | 
			
		||||
        pure_funcs: ['console.log']
 | 
			
		||||
      },
 | 
			
		||||
      output: {
 | 
			
		||||
        comments: true
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    rollupOptions: {
 | 
			
		||||
      output: {
 | 
			
		||||
        exports: "named",
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user