Move fs to exporter and add browser packer
This commit is contained in:
32
webpack.web.config.js
Normal file
32
webpack.web.config.js
Normal 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"
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user