1.0.0 • Published 4 years ago

rollup-plugin-xml v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

rollup-plugin-xml

Convert .xml files to ES6 modules:

Use

// import a single property from a XML file,
// discarding the rest
import xml from './demo.xml';
console.log( xml );

Config

import xml from "rollup-plugin-xml";
export default {
	input: "demo/main.js",
	plugins: [
		xml({
			format:"compact"//"compact" | "non-compact" | "XMLDocument"
		})
	],
	output: {
		file: "demo/bundle.js",
		format: "iife"
	},
};

Convert XML ↔ JS/JSON as compact or non-compact