2016-10-10 20:31:22 +03:00
|
|
|
var path = require("path");
|
|
|
|
var webpack = require("webpack");
|
2018-11-16 02:02:56 +03:00
|
|
|
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
2016-10-10 20:31:22 +03:00
|
|
|
var CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
target: "web",
|
|
|
|
entry: {
|
2018-03-12 21:18:07 +03:00
|
|
|
multivalue: "./src/multivalue.ts"
|
2016-10-10 20:31:22 +03:00
|
|
|
},
|
|
|
|
output: {
|
|
|
|
filename: "src/[name].js",
|
|
|
|
libraryTarget: "amd"
|
|
|
|
},
|
|
|
|
externals: [
|
2017-04-19 17:49:56 +03:00
|
|
|
{
|
|
|
|
},
|
2016-10-10 20:31:22 +03:00
|
|
|
/^VSS\/.*/, /^TFS\/.*/, /^q$/
|
|
|
|
],
|
|
|
|
resolve: {
|
2021-11-03 23:10:49 +03:00
|
|
|
extensions: [".webpack.js", ".web.js", ".ts", ".tsx", ".js"]
|
2016-10-10 20:31:22 +03:00
|
|
|
},
|
|
|
|
module: {
|
2018-08-21 03:02:35 +03:00
|
|
|
rules: [
|
2016-10-10 20:31:22 +03:00
|
|
|
{
|
|
|
|
test: /\.tsx?$/,
|
2018-08-21 03:02:35 +03:00
|
|
|
use: "ts-loader"
|
2016-10-10 20:31:22 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.s?css$/,
|
2018-11-05 21:50:55 +03:00
|
|
|
use: ["style-loader", "css-loader", "sass-loader"]
|
2016-10-10 20:31:22 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2022-05-30 13:38:27 +03:00
|
|
|
devtool: 'inline-source-map',
|
2018-08-21 03:02:35 +03:00
|
|
|
mode: "development",
|
2016-10-10 20:31:22 +03:00
|
|
|
plugins: [
|
2018-11-16 01:32:45 +03:00
|
|
|
new BundleAnalyzerPlugin({
|
|
|
|
openAnalyzer: false,
|
|
|
|
reportFilename: "bundle-analysis.html",
|
|
|
|
analyzerMode: "static"
|
|
|
|
}),
|
2021-11-03 23:10:49 +03:00
|
|
|
new CopyWebpackPlugin({
|
|
|
|
patterns: [
|
|
|
|
{ from: "./node_modules/es6-promise/dist/es6-promise.min.js", to: "libs/es6-promise.min.js" },
|
|
|
|
{ from: "./node_modules/vss-web-extension-sdk/lib/VSS.SDK.min.js", to: "libs/VSS.SDK.min.js" },
|
|
|
|
{ from: "./src/multivalue.html", to: "./" },
|
|
|
|
{ from: "./img", to: "img" },
|
|
|
|
{ from: "./readme.md", to: "readme.md" }
|
|
|
|
]})
|
2016-10-10 20:31:22 +03:00
|
|
|
]
|
|
|
|
}
|