sheetjs_sheetjs/demos/webpack
2017-05-19 12:46:08 -04:00
..
.gitignore version bump 0.8.7: bundlers 2017-03-04 20:14:08 -05:00
main.js version bump 0.8.7: bundlers 2017-03-04 20:14:08 -05:00
Makefile version bump 0.9.0: merged ODS into XLSX 2017-03-09 20:09:18 -05:00
README.md systemjs node/browser examples [ci skip] 2017-05-19 12:46:08 -04:00
webpack.config.js systemjs node/browser examples [ci skip] 2017-05-19 12:46:08 -04:00
webpack.html version bump 0.10.0: cleanup 2017-05-09 14:07:57 -04:00
xlsxworker.js version bump 0.8.7: bundlers 2017-03-04 20:14:08 -05:00
xlsxworker1.js version bump 0.8.7: bundlers 2017-03-04 20:14:08 -05:00
xlsxworker2.js version bump 0.8.7: bundlers 2017-03-04 20:14:08 -05:00

Webpack

This library is built with some dynamic logic to determine if it is invoked in a script tag or in nodejs. Webpack does not understand those feature tests, so by default it will do some strange things.

Suppressing the Node shims

The library properly guards against accidental leakage of node features in the browser but webpack disregards those. The config should explicitly suppress:

	node: {
		fs: false,
		process: false,
		Buffer: false
	}

Exporting the XLSX variable

This library will not assign to module.exports if it is run in the browser. To convince webpack, set output in the webpack config:

	output: {
		libraryTarget: 'var',
		library: 'XLSX'
	}