Skip to content

Commit

Permalink
perf: 自动remove debugger配置
Browse files Browse the repository at this point in the history
  • Loading branch information
greper committed Feb 1, 2023
1 parent 3a7d528 commit adbe940
Show file tree
Hide file tree
Showing 9 changed files with 189 additions and 176 deletions.
2 changes: 1 addition & 1 deletion docs/zh/guide/advance/column-type.md
Expand Up @@ -231,7 +231,7 @@ selectType.column.component.color='auto' //修改官方的字段类型,设置
## 字段merge插件
当你想自定义columns额外处理方法时可以使用 `registerMergeColumnPlugin` 来注册字段merge插件。
可以帮助你实现类似`dict`公共属性的功能
可以帮助你实现类似`dict``type`等公共属性的功能
```js
import { useColumns,MergeColumnPlugin } from '@fast-crud/fast-crud'
Expand Down
2 changes: 1 addition & 1 deletion packages/fast-admin/fs-admin-antdv
2 changes: 1 addition & 1 deletion packages/fast-admin/fs-admin-element
2 changes: 1 addition & 1 deletion packages/fast-admin/fs-admin-naive-ui
1 change: 1 addition & 0 deletions packages/fast-extends/vite.config.js
Expand Up @@ -29,6 +29,7 @@ export default ({ command, mode }) => {
const options = {
plugins: [vueJsx(), vue()],
esbuild: {
drop: command === "build" ? ["debugger"] : [],
jsxFactory: "h",
jsxFragment: "Fragment"
},
Expand Down
89 changes: 46 additions & 43 deletions packages/ui/ui-antdv/vite.config.js
Expand Up @@ -6,51 +6,54 @@ import strip from "@rollup/plugin-strip";
import typescript from "@rollup/plugin-typescript";
const { resolve } = path;
// https://vitejs.dev/config/
export default {
plugins: [vueJsx(), vue()],
esbuild: {
jsxFactory: "h",
jsxFragment: "Fragment"
},
build: {
lib: {
entry: resolve(__dirname, "src/index.ts"),
name: "index"
export default ({ command, mode }) => {
return {
plugins: [vueJsx(), vue()],
esbuild: {
drop: command === "build" ? ["debugger"] : [],
jsxFactory: "h",
jsxFragment: "Fragment"
},
// cssCodeSplit: true,
sourcemap: "inline",
// minify: false,
rollupOptions: {
// input: {
// main: resolve(__dirname, "src/index.js"),
// en: resolve(__dirname, "src/local/lang/en.js"),
// },
plugins: [
strip(),
visualizer(),
typescript({
target: "es2020",
rootDir: "src",
declaration: true,
declarationDir: "dist/d",
exclude: "./node_modules/**",
allowSyntheticDefaultImports: true
})
],
// make sure to externalize deps that shouldn't be bundled
// into your library
external: ["vue", "@fast-crud/fast-crud", "ant-design-vue", "@ant-design/icons-vue", "lodash-es"],
output: {
// Provide global variables to use in the UMD build
// for externalized deps
globals: {
vue: "Vue",
"@fast-crud/fast-crud": "FastCrud",
"ant-design-vue": "Antdv",
"@ant-design/icons-vue": "IconsVue",
"lodash-es": "_"
build: {
lib: {
entry: resolve(__dirname, "src/index.ts"),
name: "index"
},
// cssCodeSplit: true,
sourcemap: "inline",
// minify: false,
rollupOptions: {
// input: {
// main: resolve(__dirname, "src/index.js"),
// en: resolve(__dirname, "src/local/lang/en.js"),
// },
plugins: [
strip(),
visualizer(),
typescript({
target: "es2020",
rootDir: "src",
declaration: true,
declarationDir: "dist/d",
exclude: "./node_modules/**",
allowSyntheticDefaultImports: true
})
],
// make sure to externalize deps that shouldn't be bundled
// into your library
external: ["vue", "@fast-crud/fast-crud", "ant-design-vue", "@ant-design/icons-vue", "lodash-es"],
output: {
// Provide global variables to use in the UMD build
// for externalized deps
globals: {
vue: "Vue",
"@fast-crud/fast-crud": "FastCrud",
"ant-design-vue": "Antdv",
"@ant-design/icons-vue": "IconsVue",
"lodash-es": "_"
}
}
}
}
}
};
};
89 changes: 46 additions & 43 deletions packages/ui/ui-element/vite.config.js
Expand Up @@ -6,51 +6,54 @@ import strip from "@rollup/plugin-strip";
import typescript from "@rollup/plugin-typescript";
const { resolve } = path;
// https://vitejs.dev/config/
export default {
plugins: [vueJsx(), vue()],
esbuild: {
jsxFactory: "h",
jsxFragment: "Fragment"
},
build: {
lib: {
entry: resolve(__dirname, "src/index.ts"),
name: "element"
export default ({ command, mode }) => {
return {
plugins: [vueJsx(), vue()],
esbuild: {
drop: command === "build" ? ["debugger"] : [],
jsxFactory: "h",
jsxFragment: "Fragment"
},
// cssCodeSplit: true,
sourcemap: "inline",
// minify: false,
rollupOptions: {
// input: {
// main: resolve(__dirname, "src/index.js"),
// en: resolve(__dirname, "src/local/lang/en.js"),
// },
plugins: [
strip(),
visualizer(),
typescript({
target: "es2020",
rootDir: "src",
declaration: true,
declarationDir: "dist/d",
exclude: "./node_modules/**",
allowSyntheticDefaultImports: true
})
],
// make sure to externalize deps that shouldn't be bundled
// into your library
external: ["vue", "@fast-crud/fast-crud", "element-plus", "@element-plus/icons-vue", "lodash-es"],
output: {
// Provide global variables to use in the UMD build
// for externalized deps
globals: {
vue: "Vue",
"@fast-crud/fast-crud": "FastCrud",
"element-plus": "ElementPlus",
"@element-plus/icons-vue": "ElementPlusIcons",
"lodash-es": "_"
build: {
lib: {
entry: resolve(__dirname, "src/index.ts"),
name: "element"
},
// cssCodeSplit: true,
sourcemap: "inline",
// minify: false,
rollupOptions: {
// input: {
// main: resolve(__dirname, "src/index.js"),
// en: resolve(__dirname, "src/local/lang/en.js"),
// },
plugins: [
strip(),
visualizer(),
typescript({
target: "es2020",
rootDir: "src",
declaration: true,
declarationDir: "dist/d",
exclude: "./node_modules/**",
allowSyntheticDefaultImports: true
})
],
// make sure to externalize deps that shouldn't be bundled
// into your library
external: ["vue", "@fast-crud/fast-crud", "element-plus", "@element-plus/icons-vue", "lodash-es"],
output: {
// Provide global variables to use in the UMD build
// for externalized deps
globals: {
vue: "Vue",
"@fast-crud/fast-crud": "FastCrud",
"element-plus": "ElementPlus",
"@element-plus/icons-vue": "ElementPlusIcons",
"lodash-es": "_"
}
}
}
}
}
};
};
87 changes: 45 additions & 42 deletions packages/ui/ui-interface/vite.config.js
Expand Up @@ -6,50 +6,53 @@ import strip from "@rollup/plugin-strip";
const { resolve } = path;
import typescript from "@rollup/plugin-typescript";
// https://vitejs.dev/config/
export default {
plugins: [vueJsx(), vue()],
esbuild: {
jsxFactory: "h",
jsxFragment: "Fragment"
},
build: {
lib: {
entry: resolve(__dirname, "src/index.ts"),
name: "antdv"
export default ({ command, mode }) => {
return {
plugins: [vueJsx(), vue()],
esbuild: {
drop: command === "build" ? ["debugger"] : [],
jsxFactory: "h",
jsxFragment: "Fragment"
},
// cssCodeSplit: true,
sourcemap: "inline",
// minify: false,
rollupOptions: {
// input: {
// main: resolve(__dirname, "src/index.js"),
// en: resolve(__dirname, "src/local/lang/en.js"),
// },
plugins: [
strip(),
visualizer(),
typescript({
target: "es2020",
rootDir: "src",
declaration: true,
declarationDir: "dist/d",
exclude: "./node_modules/**",
allowSyntheticDefaultImports: true
})
],
// make sure to externalize deps that shouldn't be bundled
// into your library
external: ["vue", "@fast-crud/fast-crud", "ant-design-vue", "@ant-design/icons-vue"],
output: {
// Provide global variables to use in the UMD build
// for externalized deps
globals: {
vue: "Vue",
"@fast-crud/fast-crud": "FastCrud",
"ant-design-vue": "Antdv",
"@ant-design/icons-vue": "IconsVue"
build: {
lib: {
entry: resolve(__dirname, "src/index.ts"),
name: "antdv"
},
// cssCodeSplit: true,
sourcemap: "inline",
// minify: false,
rollupOptions: {
// input: {
// main: resolve(__dirname, "src/index.js"),
// en: resolve(__dirname, "src/local/lang/en.js"),
// },
plugins: [
strip(),
visualizer(),
typescript({
target: "es2020",
rootDir: "src",
declaration: true,
declarationDir: "dist/d",
exclude: "./node_modules/**",
allowSyntheticDefaultImports: true
})
],
// make sure to externalize deps that shouldn't be bundled
// into your library
external: ["vue", "@fast-crud/fast-crud", "ant-design-vue", "@ant-design/icons-vue"],
output: {
// Provide global variables to use in the UMD build
// for externalized deps
globals: {
vue: "Vue",
"@fast-crud/fast-crud": "FastCrud",
"ant-design-vue": "Antdv",
"@ant-design/icons-vue": "IconsVue"
}
}
}
}
}
};
};

0 comments on commit adbe940

Please sign in to comment.