xt-element-ui 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/vue.config.js DELETED
@@ -1,41 +0,0 @@
1
- module.exports = {
2
- // 关闭生产环境 sourcemap
3
- productionSourceMap: false,
4
-
5
- css: {
6
- // 开启 CSS 提取(打包成独立 css 文件,给 npm 使用)
7
- extract: true,
8
- // 启用 CSS sourcemap
9
- sourceMap: false,
10
- // 给 scss 传入全局变量(主题色、字体大小)
11
- loaderOptions: {
12
- scss: {
13
- // 这里可以自动注入全局 SCSS 变量文件(非常重要)
14
- additionalData: `@import "~@/styles/variables.scss";`
15
- }
16
- }
17
- },
18
-
19
- // 配置 Webpack 外部扩展(不打包进组件库)
20
- configureWebpack: {
21
- externals: {
22
- vue: "Vue",
23
- "element-ui": "ElementUI",
24
- },
25
- },
26
-
27
- // 组件库打包配置
28
- chainWebpack: (config) => {
29
- if (process.env.NODE_ENV === "production") {
30
- // 入口改为组件库总入口
31
- config.entry("index").clear().add("./src/index.js").end();
32
-
33
- // 输出 UMD 格式(支持 npm / script 引入)
34
- config.output
35
- .filename("index.js")
36
- .library("xt-element-ui")
37
- .libraryTarget("umd")
38
- .umdNamedDefine(true);
39
- }
40
- },
41
- };