Update target for library

This commit is contained in:
Dolan
2018-08-15 01:38:00 +01:00
parent 07261232ff
commit f969c866a7
2 changed files with 10 additions and 45 deletions

View File

@ -1,17 +1,17 @@
const path = require('path');
const path = require("path");
module.exports = {
entry: './src/index.ts',
entry: "./src/index.ts",
output: {
path: path.resolve('build'),
filename: 'index.js',
libraryTarget: 'umd'
path: path.resolve("build"),
filename: "index.js",
libraryTarget: "umd",
},
resolve: {
extensions: ['.tsx', '.ts', '.js'],
modules: [path.resolve('./src'), "node_modules"]
extensions: [".tsx", ".ts", ".js"],
modules: [path.resolve("./src"), "node_modules"],
},
module: {
@ -19,13 +19,10 @@ module.exports = {
{
test: /\.ts$/,
loaders: ["awesome-typescript-loader"],
}
},
],
},
target: 'node',
node: {
__dirname: true
}
// Because docx is now targetting web
// target: 'node',
};

View File

@ -1,32 +0,0 @@
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"
}
};