diff --git a/package.json b/package.json index 2bc3d6ce9..096d31a3c 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,8 @@ "primeicons": "4.0.0", "prismjs": "^1.15.0", "quill": "^1.3.7", + "rollup-plugin-postcss": "^4.0.0", + "rollup-plugin-vue": "^6.0.0-beta.9", "sass-loader": "^8.0.2", "vue": "3.0.3", "vue-router": "^4.0.0-0", diff --git a/rollup.config.js b/rollup.config.js new file mode 100644 index 000000000..dd38df094 --- /dev/null +++ b/rollup.config.js @@ -0,0 +1,38 @@ +import vue from 'rollup-plugin-vue'; +import postcss from 'rollup-plugin-postcss'; + +const fs = require('fs-extra'); +const path = require('path'); + +let entries = []; + +fs.readdirSync(path.resolve(__dirname, './src/components/')).forEach(folder => { + fs.readdirSync(path.resolve(__dirname, './src/components/' + folder)).forEach(file => { + if (file !== 'index.js' && file !== 'index.d.ts') { + let name = file.split(/(.vue)$|(.js)$/)[0].toLowerCase(); + if (/\.vue$/.test(file)) { + entries.push({ + input: 'src/components/' + folder + '/' + file, + external: [/\.\./], + output: [ + { + format: 'esm', + file: 'dist/' + folder + '/' + name + '.esm.js' + }, + { + format: 'umd', + name: 'primevue', + file: 'dist/' + folder + '/' + name + '.umd.js' + } + ], + plugins: [ + vue(), + postcss() + ] + }); + } + } + }); +}); + +export default entries; \ No newline at end of file diff --git a/src/components/breadcrumb/Breadcrumb.vue b/src/components/breadcrumb/Breadcrumb.vue index c4588abbe..e65a1d2bf 100755 --- a/src/components/breadcrumb/Breadcrumb.vue +++ b/src/components/breadcrumb/Breadcrumb.vue @@ -11,7 +11,7 @@