diff --git a/package.json b/package.json index 8b7af1d..a54d1e4 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "Build an element once, move it anywhere", "main": "dist/cjs/index.js", "module": "dist/esm/index.js", + "browser": "dist/web/index.js", "types": "dist/index.d.ts", "files": [ "dist/**/*.{js,ts,map}", @@ -11,7 +12,7 @@ "README.md" ], "scripts": { - "build": "rimraf dist/ && tsc -p tsconfig.cjs.json && tsc -p tsconfig.esm.json", + "build": "rimraf dist/ && tsc -p tsconfig.cjs.json && tsc -p tsconfig.esm.json && tsc -p tsconfig.web.json", "pretest": "npm run build", "test": "echo \"It built ok, that'll do for now\"", "prepack": "npm run build", diff --git a/tsconfig.web.json b/tsconfig.web.json new file mode 100644 index 0000000..38148e4 --- /dev/null +++ b/tsconfig.web.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "target": "es5", + "lib": ["es6", "dom"], + "module": "es6", + "outDir": "./dist/web" + } +} \ No newline at end of file