rs-wasm-loader
Version:
A webpack loader for Rust
33 lines (31 loc) • 758 B
JavaScript
const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
entry: "./src/index.js",
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: "babel-loader"
},
{
test: /\.rs$/,
loader: path.resolve('../')
}
]
},
devServer: {
contentBase: path.join(__dirname, "public"),
port: 3000
},
plugins: [
new HtmlWebpackPlugin({
filename: "index.html",
template: "./public/index.html"
}),
],
experiments: {
asyncWebAssembly: true
}
}