Skip to content

Commit

Permalink
Cleaning
Browse files Browse the repository at this point in the history
* Removed source maps
* Added more external deps
* Making the default to be install
  • Loading branch information
josechirivella committed Aug 16, 2023
1 parent 6d67066 commit b413215
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
23 changes: 16 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,23 @@
"test-ci": "TZ=UTC vue-cli-service test:e2e --mode test --headless --browser chrome -- --reporter mocha-junit-reporter --reporter-options mochaFile=reports/mocha/test-results.xml",
"test-unit": "JEST_JUNIT_OUTPUT_DIR=test_summary_reports/jest/ vue-cli-service test:unit --ci --runInBand --reporters=default --reporters=jest-junit"
},
"main": "./dist/modeler.common.js",
"main": "./dist/modeler.umd.js",
"module": "./dist/modeler.es.js",
"exports": {
".": {
"import": {
"import": "./dist/modeler.es.js",
"require": "./dist/modeler.umd.js"
}
},
"./dist/modeler.css": {
"import": "./dist/modeler.css",
"require": "./dist/modeler.css"
}
},
"files": [
"dist/*",
"src/*",
"public/*",
"*.json",
"*.js",
"blank.bpmn"
"dist",
"src"
],
"dependencies": {
"@babel/plugin-proposal-private-methods": "^7.12.1",
Expand Down
2 changes: 1 addition & 1 deletion src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ function install(Vue) {
}
}

export default { install };
export default install;
7 changes: 5 additions & 2 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export default defineConfig({
},
build: {
cssCodeSplit: false,
sourcemap: true,
lib: {
entry: resolve(__dirname, 'src/components/index.js'),
name: libraryName,
Expand All @@ -45,15 +44,19 @@ export default defineConfig({
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library
external: ['vue', 'moment', 'moment-timezone', '@processmaker'],
external: ['vue', 'moment', 'moment-timezone', /^@processmaker\/(?!processmaker-bpmn-moddle).+$/, 'lodash'],
output: {
exports: 'named',
assetFileNames: 'modeler.[ext]',
// Provide global variables to use in the UMD build
// for externalized deps
globals: {
vue: 'Vue',
moment: 'moment',
'moment-timezone': 'moment-timezone',
'@processmaker/screen-builder': '@processmaker/screen-builder',
'@processmaker/vue-form-elements': '@processmaker/vue-form-elements',
lodash: 'lodash',
},
},
},
Expand Down

0 comments on commit b413215

Please sign in to comment.