1
0
mirror of https://github.com/fluencelabs/wasm-bindgen synced 2025-06-23 01:31:34 +00:00
Files
.cargo
benchmarks
ci
crates
examples
add
src
Cargo.toml
README.md
index.js
package.json
webpack.config.js
canvas
char
closures
console_log
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
websockets
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/add/webpack.config.js

26 lines
787 B
JavaScript
Raw Normal View History

const path = require('path');
2018-09-11 08:42:22 +03:00
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',
},
2018-09-11 08:42:22 +03:00
plugins: [
new HtmlWebpackPlugin(),
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']
})
2018-09-11 08:42:22 +03:00
],
mode: 'development'
};