Browse Source

KERNEL-14316 fix: bundle 打包

es6
Treecat 2 years ago
parent
commit
27d627906f
  1. 52
      packages/fineui/lessconfig/bi.lessconfig.json
  2. 21
      packages/fineui/lessconfig/jsy.lessconfig.json
  3. 1
      packages/fineui/lodash.md
  4. 22
      packages/fineui/webpack.prod.js

52
packages/fineui/lessconfig/bi.lessconfig.json

@ -0,0 +1,52 @@
{
"@color-primary": "#2C60DB",
"@color-green-100": "#3FC47B",
"@color-light-blue-100": "#19B8EA",
"@color-orange-100": "#FAAA39",
"@color-red-100": "#E65251",
"@color-black": "#091E40",
"@color-light-gray": "#ECEEF3",
"@color-light-gray-theme-dark": "#292F45",
"@border-color-line": "rgba(9, 30, 64, 0.15)",
"@border-color-light-line": "#E6E9EF",
"@border-color-dark-line": "#2E3A4D",
"@color-sliver-theme-dark": "#363E55",
"@border-color-disabled": "rgba(9, 30, 64, 0.07)",
"@font-color-normal": "#091E40",
"@font-color-gray": "rgba(9, 30, 64, 0.9)",
"@font-color-light-gray": "rgba(9, 30, 64, 0.66)",
"@font-color-tips": "rgba(9, 30, 64, 0.47)",
"@font-color-disabled": "rgba(9, 30, 64, 0.25)",
"@background-color-normal": "#F8F9FC",
"@color-bi-background-active-radio": "transparent",
"@color-bi-border-radio": "rgba(9, 30, 64, 0.37)",
"@color-bi-border-disabled-radio": "rgba(9, 30, 64, 0.19)",
"@color-bi-background-active-radio-content": "#2C60DB",
"@color-bi-border-checkbox-theme-dark": "rgba(255, 255, 255, 0.37)",
"@color-bi-border-hover-active-radio-theme-dark": "#3869DC",
"@color-bi-background-active-radio-content-theme-dark": "#3869DC",
"@color-bi-background-disabled-active-radio-content": "#FFFFFF",
"@color-bi-background-disabled-active-radio-content-theme-dark": "#606479",
"@color-bi-background-disabled-active-checkbox-content": "#FFFFFF",
"@color-bi-background-disabled-active-checkbox-content-theme-dark": "#606479",
"@color-bi-background-tooltip-success": "#3F506A",
"@color-bi-background-tooltip-failure": "#E65251",
"@color-bi-border-tooltip-success": "#2E3A4D",
"@color-bi-background-toast-success": "#FFFFFF",
"@color-bi-background-toast-warning": "#FFFFFF",
"@color-bi-background-toast-error": "#FFFFFF",
"@color-bi-background-toast-normal": "#FFFFFF",
"@color-bi-color-toast-success": "#3FC47B",
"@color-bi-color-toast-warning": "#FAAA39",
"@color-bi-color-toast-error": "#E65251",
"@color-bi-color-toast-normal": "#2C60DB",
"@color-bi-color-toast-text": "#000A19",
"@color-bi-text-header-background": "rgba(9, 30, 64, 0.9)",
"@color-bi-text-header-background-theme-dark": "rgba(255, 255, 255, 0.9)",
"@font-date": "e733",
"@font-trigger-triangle": "e924",
"@font-solid-bottom": "e905",
"@font-solid-right": "e906",
"@font-dot": "e762",
"@font-down-triangle": "e70b"
}

21
packages/fineui/lessconfig/jsy.lessconfig.json

@ -0,0 +1,21 @@
{
"@background-color-card-primary": "#003D4D",
"@color-primary": "#00acbe",
"font-color-normal": "#0d1540",
"font-color-light-gray": "#0d1540",
"font-color-disabled": "fade(#0d1540, 40)",
"font-color-light-disabled": "fade(#0d1540, 20)",
"font-color-success": "#28b668",
"font-color-negative": "#e65251",
"font-color-warning": "#faaa39",
"font-color-tips": "fade(#0d1540, 40)",
"background-color-light-disabled": "fade(#0d1540, 5)",
"background-color-dark-success": "#28b668",
"background-color-negative": "#e65251",
"background-color-warning": "#faaa39",
"border-color-disabled": "#e8eaed",
"border-color-success": "#28b668",
"border-color-negative": "#e65251"
}

1
packages/fineui/lodash.md

@ -0,0 +1 @@
lodash core plus="debounce,throttle,get,set,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject,take,takeRight,without,difference,defaultsDeep,trim,merge,groupBy,uniqBy,before,after,unescape,chunk,pick,pickBy,identity"

22
packages/fineui/webpack.prod.js

@ -11,14 +11,26 @@ function git(command) {
return childProcess.execSync(`git ${command}`).toString().trim();
}
let lessVariables = {};
if (process.env.LESS_CONFIG_PATH) {
const lessConfigPath = path.isAbsolute(process.env.LESS_CONFIG_PATH)
? process.env.LESS_CONFIG_PATH
: path.resolve(__dirname, "lessconfig", process.env.LESS_CONFIG_PATH);
lessVariables = fs.existsSync(lessConfigPath) ? require(lessConfigPath) || {} : {};
}
module.exports = {
mode: "production",
entry: "./src/bundle.js",
entry: {
"fineui.min": "./src/bundle.js",
},
output: {
path: path.resolve(__dirname, "dist"),
filename: "[name].js",
},
devtool: false,
devtool: "hidden-source-map",
module: {
rules: [
{
@ -48,7 +60,7 @@ module.exports = {
loader: "less-loader",
options: {
relativeUrls: false,
// modifyVars: lessVariables,
modifyVars: lessVariables,
},
},
],
@ -61,9 +73,7 @@ module.exports = {
"@": path.resolve(__dirname, "src"),
},
},
plugins: [
new CircularDependencyPlugin(),
],
plugins: [new CircularDependencyPlugin()],
optimization: {
usedExports: false,
minimize: true,

Loading…
Cancel
Save