Skip to content

Commit

Permalink
🔧 Transpile to commonjs modules in addition to es2015
Browse files Browse the repository at this point in the history
- Allow usage in backend app without a webpack/babel setup
  • Loading branch information
ftes committed Dec 15, 2020
1 parent 961eae2 commit 230ba18
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
/lib
/commonjs
/example/build.js
/example/build.js.map
/example/build.js.map
13 changes: 11 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,24 @@
"name": "vuex-class-modules",
"version": "1.1.3",
"description": "Typescript class decorators for class-style vuex modules.",
"main": "lib/index.js",
"main": "commonjs/index.js",
"module": "lib/index.js",
"exports": {
".": {
"require": "./commonjs/index.js",
"default": "./lib/index.js"
}
},
"types": "lib/index.d.ts",
"files": [
"dist",
"lib"
],
"scripts": {
"test": "jest --config jestconfig.json",
"build": "tsc",
"build": "npm run build:es2015 && npm run build:commonjs",
"build:es2015": "tsc",
"build:commonjs": "tsc -m commonjs --outDir ./commonjs",
"lint": "tslint -p tsconfig.json --fix",
"example": "npm run build && webpack --config ./example/webpack.config.js",
"prepare": "npm run build",
Expand Down

0 comments on commit 230ba18

Please sign in to comment.