Skip to content

Fix CSS being removed by tree shaking in Webpack #31

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

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Locally register the components.

```js
import { VuePassword, VuePasswordAuto } from 'vue-password';
import "vue-password/dist/VuePassword.css";

export default {
...
Expand All @@ -53,6 +54,19 @@ export default {
};
```

Import the CSS
---
Due to Webpack tree shaking improvements, the CSS needs to be explicitly imported within your application.

JavaScript
```js
import "vue-password/dist/VuePassword.css";
```
CSS
```css
@import "~vue-password/dist/VuePassword.css";
```

## Usage

Use the props in your HTML and apply a v-model attribute for the password and any additional props for the desired configuration. The password input uses the $attrs attributes, so form validation props such as required, minlength, and maxlength will function on the input element. The following example shows how vue-password could be used in a registration form using [Tailwind CSS](https://tailwindcss.com/).
Expand All @@ -62,6 +76,8 @@ Use the props in your HTML and apply a v-model attribute for the password and an
```js
import Vue from 'vue'
import { VuePassword } from 'vue-password'
import "vue-password/dist/VuePassword.css";


new Vue({
el: '#app',
Expand Down Expand Up @@ -162,6 +178,7 @@ The password input emits an input event to use with v-model. Other events are bi

```js
import { VuePassword } from 'vue-password'
import "vue-password/dist/VuePassword.css";

new Vue({
el: '#app',
Expand Down
41 changes: 28 additions & 13 deletions dist/VuePassword.common.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/VuePassword.common.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/VuePassword.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading