1
0
mirror of https://github.com/fluencelabs/wasm-bindgen synced 2025-06-22 17:21:35 +00:00
Files
.cargo
benchmarks
ci
crates
examples
add
canvas
char
closures
console_log
deno
dom
duck-typed-interfaces
fetch
guide-supported-types-examples
hello_world
import_js
julia_set
paint
performance
raytrace-parallel
request-animation-frame
todomvc
wasm-in-wasm
wasm2js
webaudio
webgl
webrtc_datachannel
websockets
webxr
src
Cargo.toml
README.md
index.html
index.js
package.json
webpack.config.js
webxr.js
without-a-bundler
without-a-bundler-no-modules
.gitignore
README.md
guide
releases
src
tests
.gitattributes
.gitignore
CHANGELOG.md
CONTRIBUTING.md
Cargo.toml
LICENSE-APACHE
LICENSE-MIT
README.md
_package.json
azure-pipelines.yml
build.rs
publish.rs
wasm-bindgen/examples/webxr/webpack.config.js
kevthecoder 2b29650920 Webxrdevice ()
* 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>
2020-03-17 09:14:05 -05:00

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'
};