|
@@ -3,26 +3,25 @@ const webpack = require("webpack");
|
|
|
|
|
|
module.exports = {
|
|
|
entry: path.resolve(__dirname, "gramjs/index.ts"),
|
|
|
-
|
|
|
module: {
|
|
|
rules: [
|
|
|
{
|
|
|
test: /\.ts$/,
|
|
|
use: "ts-loader",
|
|
|
- exclude: /node_modules/,
|
|
|
+ exclude: /node_modules/
|
|
|
},
|
|
|
|
|
|
{
|
|
|
test: /\.js$/,
|
|
|
use: "babel-loader",
|
|
|
- exclude: /node_modules/,
|
|
|
+ exclude: /node_modules/
|
|
|
},
|
|
|
|
|
|
{
|
|
|
test: /\.tl$/i,
|
|
|
- loader: "raw-loader",
|
|
|
- },
|
|
|
- ],
|
|
|
+ loader: "raw-loader"
|
|
|
+ }
|
|
|
+ ]
|
|
|
},
|
|
|
|
|
|
resolve: {
|
|
@@ -33,20 +32,20 @@ module.exports = {
|
|
|
net: false,
|
|
|
crypto: false,
|
|
|
os: require.resolve("os-browserify/browser"),
|
|
|
- util: false,
|
|
|
+ util: require.resolve("util/"),
|
|
|
assert: false,
|
|
|
stream: false,
|
|
|
- constants: false,
|
|
|
- },
|
|
|
+ constants: false
|
|
|
+ }
|
|
|
},
|
|
|
mode: "development",
|
|
|
plugins: [
|
|
|
new webpack.ProvidePlugin({
|
|
|
- Buffer: ["buffer", "Buffer"],
|
|
|
+ Buffer: ["buffer", "Buffer"]
|
|
|
}),
|
|
|
new webpack.ProvidePlugin({
|
|
|
- process: "process/browser",
|
|
|
- }),
|
|
|
+ process: "process/browser"
|
|
|
+ })
|
|
|
],
|
|
|
|
|
|
output: {
|
|
@@ -54,6 +53,6 @@ module.exports = {
|
|
|
libraryTarget: "umd",
|
|
|
auxiliaryComment: "Test Comment",
|
|
|
filename: "gramjs.js",
|
|
|
- path: path.resolve(__dirname, "browser"),
|
|
|
- },
|
|
|
+ path: path.resolve(__dirname, "browser")
|
|
|
+ }
|
|
|
};
|