Skip to content

Commit d10f585

Browse files
Adjusting Rollup to generate a UMD file.
1 parent 83d4584 commit d10f585

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"scripts": {
1212
"test": "jest",
1313
"build": "tsc",
14-
"rollup-build": "rollup index.ts -c -f cjs -o dist/xslt-processor.js",
14+
"rollup-build": "rollup index.ts -c -f umd -o dist/xslt-processor.js",
1515
"build_test": "yarn build_tests && yarn build_xpath_script && yarn build_xslt_script",
1616
"build_xpath_script": "rollup test_src/xpath_script.js -c -f iife -o test_dist/xpath_script.js",
1717
"build_xslt_script": "rollup test_src/xslt_script.js -c -f iife -o test_dist/xslt_script.js",

rollup.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ export default {
2222
terser()
2323
],
2424
output: {
25-
format: 'cjs',
25+
format: 'umd',
26+
name: 'XsltProcessor',
2627
sourcemap: true
2728
}
2829
}

tsconfig.rollup.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,15 @@
22
"compilerOptions": {
33
"jsx": "preserve",
44
"outDir": "dist",
5-
"module": "esnext",
6-
"target": "ES2017",
5+
"target": "ES5",
76
"rootDir": ".",
87
"allowJs": true,
98
"sourceMap": true,
109
"declaration": true,
1110
"esModuleInterop": true,
1211
"skipLibCheck": true,
1312
"experimentalDecorators": true,
14-
"emitDecoratorMetadata": true,
15-
"moduleResolution": "NodeNext"
13+
"emitDecoratorMetadata": true
1614
},
1715
"exclude": [
1816
"babel.config.js",

0 commit comments

Comments
 (0)