Setup usage of Vite instead of webpack for faster development

This commit is contained in:
2025-12-17 09:46:52 +01:00
parent a30232d3ce
commit 0197299c89
30 changed files with 391 additions and 347 deletions

View File

@@ -1,127 +0,0 @@
// Compile and loads all assets from the Chill Main Bundle
module.exports = function (encore, entries) {
// Push into "chill" entrypoint
entries.push(__dirname + "/Resources/public/chill/index.js");
// Aliases are used when webpack is trying to resolve modules path
encore.addAliases({
ChillMainAssets: __dirname + "/Resources/public",
ShowHide: __dirname + "/Resources/public/lib/show_hide",
Tabs: __dirname + "/Resources/public/lib/tabs",
});
// Page entrypoints
encore.addEntry(
"page_login",
__dirname + "/Resources/public/page/login/index.js",
);
encore.addEntry(
"page_location",
__dirname + "/Resources/public/page/location/index.js",
);
encore.addEntry(
"page_workflow_show",
__dirname + "/Resources/public/page/workflow-show/index.js",
);
encore.addEntry(
"page_homepage_widget",
__dirname + "/Resources/public/page/homepage_widget/index.js",
);
encore.addEntry(
"page_export",
__dirname + "/Resources/public/page/export/index.js",
);
encore.addEntry(
"page_download_exports",
__dirname + "/Resources/public/vuejs/DownloadExport/index.ts",
);
// Modules entrypoints
encore.addEntry(
"mod_collection",
__dirname + "/Resources/public/module/collection/index.ts",
);
encore.addEntry(
"mod_forkawesome",
__dirname + "/Resources/public/module/forkawesome/index.js",
);
encore.addEntry(
"mod_bootstrap",
__dirname + "/Resources/public/module/bootstrap/index.js",
);
encore.addEntry(
"mod_ckeditor5",
__dirname + "/Resources/public/module/ckeditor5/index",
);
encore.addEntry(
"mod_disablebuttons",
__dirname + "/Resources/public/module/disable-buttons/index.js",
);
encore.addEntry(
"mod_blur",
__dirname + "/Resources/public/module/blur/index.js",
);
encore.addEntry(
"mod_input_address",
__dirname + "/Resources/public/vuejs/Address/mod_input_address_index.js",
);
encore.addEntry(
"mod_notification_toggle_read_status",
__dirname + "/Resources/public/module/notification/toggle_read.js",
);
encore.addEntry(
"mod_notification_toggle_read_all_status",
__dirname + "/Resources/public/module/notification/toggle_read_all.ts",
);
encore.addEntry(
"mod_pickentity_type",
__dirname + "/Resources/public/module/pick-entity/index.js",
);
encore.addEntry(
"mod_entity_workflow_subscribe",
__dirname + "/Resources/public/module/entity-workflow-subscribe/index.js",
);
encore.addEntry(
"mod_entity_workflow_pick",
__dirname + "/Resources/public/module/entity-workflow-pick/index.js",
);
encore.addEntry(
"mod_pick_postal_code",
__dirname + "/Resources/public/module/pick-postal-code/index.js",
);
encore.addEntry(
"mod_pick_rolling_date",
__dirname + "/Resources/public/module/pick-rolling-date/index.js",
);
encore.addEntry(
"mod_address_details",
__dirname + "/Resources/public/module/address-details/index",
);
encore.addEntry(
"mod_news",
__dirname + "/Resources/public/module/news/index.js",
);
encore.addEntry(
"mod_workflow_attachment",
__dirname + "/Resources/public/vuejs/WorkflowAttachment/index",
);
encore.addEntry(
"mod_saved_export_button",
__dirname + "/Resources/public/vuejs/SavedExportButtons/index.ts",
);
// Vue entrypoints
encore.addEntry(
"vue_address",
__dirname + "/Resources/public/vuejs/Address/index.js",
);
encore.addEntry(
"vue_onthefly",
__dirname + "/Resources/public/vuejs/OnTheFly/index.js",
);
encore.addEntry(
"page_workflow_waiting_post_process",
__dirname + "/Resources/public/vuejs/WaitPostProcessWorkflow/index.ts"
);
};

View File

@@ -0,0 +1,64 @@
export default {
chillBase: [
"./src/Bundle/ChillMainBundle/Resources/public/chill/index.js",
],
aliases: {
ChillMainAssets: "./src/Bundle/ChillMainBundle/Resources/public",
ShowHide: "./src/Bundle/ChillMainBundle/Resources/public/lib/show_hide",
Tabs: "./src/Bundle/ChillMainBundle/Resources/public/lib/tabs",
},
inputs: {
page_login: "./src/Bundle/ChillMainBundle/Resources/public/page/login/index.js",
page_location:
"./src/Bundle/ChillMainBundle/Resources/public/page/location/index.js",
page_workflow_show:
"./src/Bundle/ChillMainBundle/Resources/public/page/workflow-show/index.js",
page_homepage_widget:
"./src/Bundle/ChillMainBundle/Resources/public/page/homepage_widget/index.js",
page_export:
"./src/Bundle/ChillMainBundle/Resources/public/page/export/index.js",
page_download_exports:
"./src/Bundle/ChillMainBundle/Resources/public/vuejs/DownloadExport/index.ts",
mod_collection:
"./src/Bundle/ChillMainBundle/Resources/public/module/collection/index.ts",
mod_forkawesome:
"./src/Bundle/ChillMainBundle/Resources/public/module/forkawesome/index.js",
mod_bootstrap:
"./src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/index.js",
mod_ckeditor5:
"./src/Bundle/ChillMainBundle/Resources/public/module/ckeditor5/index",
mod_disablebuttons:
"./src/Bundle/ChillMainBundle/Resources/public/module/disable-buttons/index.js",
mod_blur:
"./src/Bundle/ChillMainBundle/Resources/public/module/blur/index.js",
mod_input_address:
"./src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/mod_input_address_index.js",
mod_notification_toggle_read_status:
"./src/Bundle/ChillMainBundle/Resources/public/module/notification/toggle_read.js",
mod_notification_toggle_read_all_status:
"./src/Bundle/ChillMainBundle/Resources/public/module/notification/toggle_read_all.ts",
mod_pickentity_type:
"./src/Bundle/ChillMainBundle/Resources/public/module/pick-entity/index.js",
mod_entity_workflow_subscribe:
"./src/Bundle/ChillMainBundle/Resources/public/module/entity-workflow-subscribe/index.js",
mod_entity_workflow_pick:
"./src/Bundle/ChillMainBundle/Resources/public/module/entity-workflow-pick/index.js",
mod_pick_postal_code:
"./src/Bundle/ChillMainBundle/Resources/public/module/pick-postal-code/index.js",
mod_pick_rolling_date:
"./src/Bundle/ChillMainBundle/Resources/public/module/pick-rolling-date/index.js",
mod_address_details:
"./src/Bundle/ChillMainBundle/Resources/public/module/address-details/index",
mod_news: "./src/Bundle/ChillMainBundle/Resources/public/module/news/index.js",
mod_workflow_attachment:
"./src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/index",
mod_saved_export_button:
"./src/Bundle/ChillMainBundle/Resources/public/vuejs/SavedExportButtons/index.ts",
vue_address:
"./src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/index.js",
vue_onthefly:
"./src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/index.js",
page_workflow_waiting_post_process:
"./src/Bundle/ChillMainBundle/Resources/public/vuejs/WaitPostProcessWorkflow/index.ts",
},
};