diff options
| -rw-r--r-- | package.json | 3 | ||||
| -rw-r--r-- | webpack.config.js | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/package.json b/package.json index 5555d58..cd206e4 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "types": "dist/lib.d.ts", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "build": "webpack --mode production" + "build": "webpack --mode production", + "prepublish": "npm run build" }, "author": "TheMas3212", "license": "MIT", diff --git a/webpack.config.js b/webpack.config.js index df8797a..646834b 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -16,6 +16,10 @@ module.exports = { }, output: { filename: 'lib.js', + library: { + type: 'commonjs' + }, path: path.resolve(__dirname, 'dist'), + clean: true } };
\ No newline at end of file |
