diff --git a/.npmignore b/.npmignore index a12b7f4..4479aea 100644 --- a/.npmignore +++ b/.npmignore @@ -1,4 +1,5 @@ !dist/lib/**/*.js +!es/lib/**/*.js !typings/lib/**/*.d.ts .vscode/ .idea/ diff --git a/package.json b/package.json index ab9cf1d..807a80e 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "clientruntime" ], "main": "./dist/lib/msRestAzure.js", + "browser": "./es/lib/msRestAzure.js", "types": "./typings/lib/msRestAzure.d.ts", "license": "MIT", "dependencies": { @@ -55,8 +56,9 @@ "url": "http://github.com/Azure/ms-rest-azure-js/issues" }, "scripts": { - "build": "run-p build:node build:browser", + "build": "run-p build:node build:es build:browser", "build:node": "tsc", + "build:es": "tsc -p tsconfig.es.json", "build:browser": "webpack && node node_modules/uglify-es/bin/uglifyjs --source-map -c -m -o msRestAzureBundle.min.js msRestAzureBundle.js", "watch:node": "tsc -w", "watch:browser": "webpack -w", diff --git a/tsconfig.es.json b/tsconfig.es.json new file mode 100644 index 0000000..dae744d --- /dev/null +++ b/tsconfig.es.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "es6", + "outDir": "es" + } +}