forked from Dedac/RestDataMappingPicklist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
57 lines (55 loc) · 1.56 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
var CopyWebpackPlugin = require('copy-webpack-plugin');
const controlConfig = {
entry: './src/index.tsx',
mode: 'development',
output: {
filename: 'selector.js',
path: path.resolve(__dirname, 'dist'),
},
devtool: 'inline-source-map',
devServer: {
https: true,
port:44300
},
resolve: {
extensions: ['.json', '.ts', '.tsx', '.js','.css'],
},
module: {
rules: [
{ test: /\.json$/, use: 'json' },
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
{
test: /\.(png|woff|woff2|eot|ttf|svg)$/,
loader: 'file-loader',
},
],
},
plugins: [
new webpack.optimize.ModuleConcatenationPlugin(),
new HtmlWebpackPlugin({
template: 'src/selector.html',
filename: 'selector.html',
}),
new CopyWebpackPlugin({
patterns: [
{ from: "./node_modules/es6-promise/dist/es6-promise.min.js", to: "libs/es6-promise.min.js" },
{ from: "./node_modules/azure-devops-extension-sdk/SDK.min.js", to: "libs/SDK.min.js" },
{ from: "./src/selector.html", to: "./" },
{ from: "./img", to: "img" },
{ from: "./src/RestSelector.css", to: "./" },
]
})
],
};
module.exports = [controlConfig];