Move fs to exporter and add browser packer

This commit is contained in:
Dolan
2018-04-24 22:56:56 +01:00
parent 06418655c0
commit e8bc7952db
8 changed files with 74 additions and 7 deletions

32
webpack.web.config.js Normal file
View File

@ -0,0 +1,32 @@
const path = require('path');
module.exports = {
entry: './src/index.ts',
output: {
path: path.resolve('build'),
filename: 'index.web.js',
libraryTarget: 'umd'
},
resolve: {
extensions: ['.tsx', '.ts', '.js'],
modules: [path.resolve('./src'), "node_modules"]
},
module: {
rules: [
{
test: /\.ts$/,
loaders: ["awesome-typescript-loader"],
}
],
},
node: {
__dirname: true,
fs: "empty",
tls: "empty",
net: "empty"
}
};