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

Allow bundler to choose right build #32

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

Conversation

shrpne
Copy link
Contributor

@shrpne shrpne commented Oct 2, 2019

I have changed the direct import of bundled minified version to generic 'autonumeric'.

So bundlers like webpack will be able to choose the right version depends on the package.json fields: main, browser, module.
This can lead to smaller bundle size for ES6 environment.

Notes:

  • dist/vue-autonumeric.js is not really changed, only variable naming was changed by webpack during build, if you want I can revert it
  • There is a note in the webpack.base.js about the need of webpack alias for ES6 module setup, but it works fine for me without alias, maybe it is outdated now and was required only for older versions of webpack?

@agentschmitt
Copy link
Contributor

  • There is a note in the webpack.base.js about the need of webpack alias for ES6 module setup, but it works fine for me without alias, maybe it is outdated now and was required only for older versions of webpack?

Are you are building in a windows enviroment? It would work there cause OS is not case sensitive.
If you build in linux enviroment or when you use case-sensitive-paths-webpack-plugin (default in the vue-cli) it would still fail without alias i think.

@shrpne
Copy link
Contributor Author

shrpne commented Feb 5, 2020

As I understand autonumeric already has a problem with case-sensitive systems and I don't try to solve it.
Here is some PRs trying to handle it #6 #30
If some of them will be merged then I will rebase my PR to align with them.

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