fix: 初始化
This commit is contained in:
31
packages/icpx-organization/build/svg-icons/index.js
Normal file
31
packages/icpx-organization/build/svg-icons/index.js
Normal file
@ -0,0 +1,31 @@
|
||||
const path = require('path');
|
||||
const { build } = require('vite');
|
||||
const { createSvgIconsPlugin } = require('vite-plugin-svg-icons');
|
||||
|
||||
(async () => {
|
||||
await build({
|
||||
configFile: false,
|
||||
publicDir: false,
|
||||
plugins: [
|
||||
createSvgIconsPlugin({
|
||||
iconDirs: [
|
||||
path.resolve(process.cwd(), 'src/assets/ICP'),
|
||||
path.resolve(process.cwd(), 'src/assets/plm'),
|
||||
],
|
||||
symbolId: 'icon-[dir]-[name]',
|
||||
customDomId: '__svg__icons__icp__dom__',
|
||||
}),
|
||||
],
|
||||
build: {
|
||||
rollupOptions: {
|
||||
input: {
|
||||
'svg-icons': path.resolve(process.cwd(), 'build/svg-icons/svg-icons-register.js'),
|
||||
},
|
||||
output: {
|
||||
entryFileNames: 'index.js',
|
||||
},
|
||||
},
|
||||
outDir: path.resolve(process.cwd(), 'src/assets/svg-icons/'),
|
||||
},
|
||||
});
|
||||
})();
|
Reference in New Issue
Block a user