Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants