diff --git a/README.md b/README.md index b2ac0bb..063bb0d 100644 --- a/README.md +++ b/README.md @@ -31,14 +31,6 @@ import SimpowerValidation from 'simpower-validation'; const validate = new SimpowerValidation('#form'); ``` -or using a CommonJS build tool - -```js -const SimpowerValidation = reqiure('simpower-validation'); - -const validate = new SimpowerValidation('#form'); -``` - If you don't use module bundlers, you can import SimpowerValidation via a browser: ```js diff --git a/package.json b/package.json index 975abed..382d46d 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,12 @@ { "name": "simpower-validation", - "version": "1.0.0", + "version": "1.0.1", "description": "Modern, simple but powerful form validation library written in pure JavaScript, with no dependencies.", - "main": "./simpower-validation.production.min.js", + "main": "./simpower-validation.esm.js", "module": "./simpower-validation.esm.js", "exports": { ".": { - "import": "./simpower-validation.esm.js", - "require": "./simpower-validation.production.min.js" + "import": "./simpower-validation.esm.js" } }, "browserslist": { @@ -43,12 +42,6 @@ "url": "https://github.com/Kallenju/simpower-validation/issues" }, "homepage": "https://github.com/Kallenju/simpower-validation#readme", - "funding": [ - { - "type": "patreon", - "url": "https://www.patreon.com/" - } - ], "devDependencies": { "@babel/core": "^7.20.2", "@babel/eslint-parser": "^7.19.1", diff --git a/webpack.prod.js b/webpack.prod.js index 069050f..d7b73c6 100644 --- a/webpack.prod.js +++ b/webpack.prod.js @@ -18,6 +18,11 @@ const config = { output: { filename: 'simpower-validation.production.min.js', + library: { + name: 'SimpowerValidation', + type: 'window', + export: 'default', + }, path: path.resolve(__dirname, './dist'), clean: true, },