Skip to content
This repository was archived by the owner on Mar 14, 2025. It is now read-only.

chore: optimise webpack config for examples #297

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

webdiscus
Copy link

Hello @ankurk91,

I'm using your awesome component and have optimized the Webpack config for myself.
Now I would like to share an improved configuration.

Before merging try please my forked branch:

git clone https://github.com/webdiscus/demo-vue-flatpickr-component.git
cd demo-vue-flatpickr-component
npm i
npm run build
npm start

Note: file-loader is deprecated in Webpack 5, use the type: 'asset/resource' instead of file-loader

new VueLoaderPlugin(),
new HtmlBundlerPlugin({
entry: {
'index': './examples/index.html',
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the syntax of the entry plugin option is the same as original webpack entry.
The key of the entry object is the output file w/o .html extension.
For example:

'index': './examples/index.html', // => saves to "docs/index.html"
'about/index':  './examples/about.html', // => saves to "docs/about/index.html"

@ankurk91 ankurk91 self-assigned this Jan 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants