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