mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-04 12:58:32 +03:00
2b29650920
* crates/web-sys/webidls/enabled/WebXRDevice.webidl * Add WebXR Web IDL. * Add WebXr example. * Workaround in WebXR for FrozenArray and XRWebGLLayer constructor. * Remove commented code. * Attempt to improve WebXr example. * Add WebXr as unstable WebIDL. * Fixes for XRWebGLLayer. * Tidy up WebXR example code. * Update WebXr example docs. Co-authored-by: Kev Kirkland <kev.kirkland@elucidata.co.uk>
28 lines
827 B
JavaScript
28 lines
827 B
JavaScript
const path = require('path');
|
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
const webpack = require('webpack');
|
|
const WasmPackPlugin = require("@wasm-tool/wasm-pack-plugin");
|
|
|
|
module.exports = {
|
|
entry: './index.js',
|
|
output: {
|
|
path: path.resolve(__dirname, 'dist'),
|
|
filename: 'index.js',
|
|
},
|
|
plugins: [
|
|
new HtmlWebpackPlugin({
|
|
template: 'index.html'
|
|
}),
|
|
new WasmPackPlugin({
|
|
crateDirectory: path.resolve(__dirname, ".")
|
|
}),
|
|
// Have this example work in Edge which doesn't ship `TextEncoder` or
|
|
// `TextDecoder` at this time.
|
|
new webpack.ProvidePlugin({
|
|
TextDecoder: ['text-encoding', 'TextDecoder'],
|
|
TextEncoder: ['text-encoding', 'TextEncoder']
|
|
})
|
|
],
|
|
mode: 'development'
|
|
};
|