@ecoding/base.build 1.0.3 → 1.0.4

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.
@@ -1,5 +1,6 @@
1
1
  const MiniCssExtractPlugin = require("mini-css-extract-plugin");
2
2
  const { isEnvDevelopment, isEnvProduction } = require("../../z-helpers/util");
3
+ const { customConfig } = require("../../z-helpers/config");
3
4
 
4
5
  const loaders = [
5
6
  isEnvDevelopment && { loader: "style-loader" },
@@ -19,12 +20,12 @@ const loaders = [
19
20
  loader: "postcss-loader",
20
21
  options: {
21
22
  postcssOptions: {
22
- plugins: {
23
+ plugins: Object.assign({}, customConfig.notAutoprefixer ? {} : {
23
24
  autoprefixer: {
24
25
  overrideBrowserslist: ["IE 10", "iOS >=6", "Android >=4"],
25
26
  remove: false
26
27
  }
27
- }
28
+ })
28
29
  }
29
30
  }
30
31
  }
@@ -1,4 +1,5 @@
1
1
  const { rootPath } = require('../z-helpers/paths');
2
+ const { customConfig } = require("../z-helpers/config");
2
3
 
3
4
  const getResolve = () => {
4
5
  return {
@@ -18,9 +19,15 @@ const getResolve = () => {
18
19
 
19
20
  // 定义别名,在代码里可直接写
20
21
  // import xx from '@/'; 缓存src目录为@ 符号,避免重复寻址
21
- alias: {
22
- "@": rootPath("./src")
23
- },
22
+ alias: Object.assign(
23
+ {
24
+ "@": rootPath("./src"),
25
+ // 在使用react-pdf时,高版本包在package.json里设置了 "type": "module", 导致非配置 "type": "module" 工程失效,在别名处加入对应的报错包即可解决
26
+ // 'react/jsx-runtime': require.resolve('react/jsx-runtime'),
27
+ },
28
+ customConfig.alias ? customConfig.alias : {}
29
+ ),
30
+
24
31
 
25
32
  // fallback:是模块在root及默认路径下都未找到时的最终查找路径
26
33
  // 设为false就是放弃备选的引用,假如第三方里用到了node内置包,此设置可忽略
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecoding/base.build",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "tpl building",
5
5
  "author": "cxc",
6
6
  "license": "MIT",
@@ -14,7 +14,7 @@
14
14
  "publishConfig": {
15
15
  "access": "public"
16
16
  },
17
- "gitHead": "fc17f614f625d1910b770d6cd3fabd2aebaca33b",
17
+ "gitHead": "47d1583b4da95f7136edc9b16de90cb925e40dfb",
18
18
  "dependencies": {
19
19
  "@babel/core": "7.26.0",
20
20
  "@babel/plugin-proposal-decorators": "7.25.9",