ms-rest-js/webpack.testconfig.ts

46 строки
1.2 KiB
TypeScript
Исходник Обычный вид История

2018-04-18 00:36:24 +03:00
import * as webpack from 'webpack';
import * as glob from 'glob';
import * as path from 'path';
const config: webpack.Configuration = {
2018-05-11 00:57:02 +03:00
entry: [...glob.sync(path.join(__dirname, 'test/shared/**/*.ts')), ...glob.sync(path.join(__dirname, 'test/browser/**/*.ts'))],
2018-04-18 00:36:24 +03:00
mode: 'development',
devtool: 'source-map',
output: {
filename: 'testBundle.js',
path: __dirname
},
plugins: [
new webpack.NormalModuleReplacementPlugin(/(\.).+util\/base64/, path.resolve(__dirname, "./lib/util/base64.browser.ts")),
new webpack.NormalModuleReplacementPlugin(/(\.).+util\/xml/, path.resolve(__dirname, "./lib/util/xml.browser.ts")),
new webpack.NormalModuleReplacementPlugin(/(\.).+defaultHttpClient/, path.resolve(__dirname, "./lib/defaultHttpClient.browser.ts"))
],
2018-04-18 00:36:24 +03:00
module: {
rules: [
{
test: /\.tsx?$/,
loader: 'ts-loader',
exclude: /(node_modules)/,
options: { configFile: path.join(__dirname, './tsconfig.es.json') }
2018-04-18 00:36:24 +03:00
}
]
},
resolve: {
2018-06-04 20:10:02 +03:00
extensions: [".tsx", ".ts", ".js"]
2018-04-18 00:36:24 +03:00
},
node: {
fs: "empty",
2018-04-18 00:36:24 +03:00
net: false,
path: "empty",
2018-04-18 00:36:24 +03:00
dns: false,
tls: false,
tty: false,
v8: false,
Buffer: false,
process: false,
stream: "empty"
2018-04-18 00:36:24 +03:00
}
};
export = config;