This repository was archived by the owner on Dec 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack-hostwebproxy.config.js
More file actions
49 lines (47 loc) · 1.52 KB
/
webpack-hostwebproxy.config.js
File metadata and controls
49 lines (47 loc) · 1.52 KB
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
'use strict'
const path = require("path");
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin');
module.exports = {
name: 'host-web-proxy',
entry: ['whatwg-fetch', './src/HostWebProxy.js'],
module: {
rules: [
//Delicious ES2015 code, made simple for simpleton browsers.
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel-loader',
query: {
presets: [["es2015", { "modules": false }]],
plugins: [
"transform-runtime",
"transform-async-to-generator",
"transform-flow-strip-types"
]
}
},
{ test: /\.json$/, loader: "hson-loader" },
{
test: /\.aspx$/,
loader: 'raw-loader'
}
]
},
output: {
path: path.join(__dirname, '/dist'),
publicPath: '/',
filename: 'HostWebProxy.js',
},
plugins: [
new HtmlWebpackPlugin({
template: './src/HostWebProxy.aspx',
filename: 'HostWebProxy.aspx',
inject: 'body',
inlineSource: '.(js|css)$' // embed all javascript and css inline
}),
new HtmlWebpackInlineSourcePlugin(),
new webpack.NoEmitOnErrorsPlugin()
]
};