mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-14 15:31:31 +00:00
Add webpack; Setup instructions
This commit is contained in:
34
webpack.config.js
Normal file
34
webpack.config.js
Normal file
@ -0,0 +1,34 @@
|
||||
var path = require("path");
|
||||
var webpack = require("webpack");
|
||||
|
||||
module.exports = {
|
||||
entry: [ "./src/glue/js.ts", "./src/index.ts" ],
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.ts$/,
|
||||
use: "ts-loader",
|
||||
exclude: /node_modules/
|
||||
}
|
||||
]
|
||||
},
|
||||
externals: [ "binaryen" ],
|
||||
resolve: {
|
||||
extensions: [ ".ts", ".js" ]
|
||||
},
|
||||
output: {
|
||||
filename: "assemblyscript.js",
|
||||
path: path.resolve(__dirname, "dist"),
|
||||
library: "assemblyscript",
|
||||
libraryTarget: "umd"
|
||||
},
|
||||
plugins: [
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
minimize: true,
|
||||
sourceMap: true
|
||||
}),
|
||||
new webpack.SourceMapDevToolPlugin({
|
||||
filename: "assemblyscript.js.map"
|
||||
})
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user