UNPKG

2.1 kBJavaScriptView Raw
1/*
2 * Licensed under the Apache License, Version 2.0 (the "License");
3 * you may not use this file except in compliance with the License.
4 * You may obtain a copy of the License at
5 *
6 * http://www.apache.org/licenses/LICENSE-2.0
7 *
8 * Unless required by applicable law or agreed to in writing, software
9 * distributed under the License is distributed on an "AS IS" BASIS,
10 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 * See the License for the specific language governing permissions and
12 * limitations under the License.
13 */
14
15'use strict';
16
17let path = require('path');
18const webpack = require('webpack');
19const packageJson = require('./package.json');
20
21module.exports = {
22 entry: {
23 client: [
24 './index.js'
25 ]
26 },
27 output: {
28 path: path.join(__dirname, 'umd'),
29 filename: 'concerto.js',
30 library: 'concerto',
31 libraryTarget: 'umd',
32 umdNamedDefine: true
33 },
34 plugins: [
35 new webpack.BannerPlugin(`Concerto v${packageJson.version}
36Licensed under the Apache License, Version 2.0 (the "License");
37you may not use this file except in compliance with the License.
38You may obtain a copy of the License at
39http://www.apache.org/licenses/LICENSE-2.0
40Unless required by applicable law or agreed to in writing, software
41distributed under the License is distributed on an "AS IS" BASIS,
42WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
43See the License for the specific language governing permissions and
44limitations under the License.`),
45 new webpack.DefinePlugin({
46 'process.env': {
47 'NODE_ENV': JSON.stringify('production')
48 }
49 }),
50 ],
51 module: {
52 rules: [
53 {
54 test: /\.js$/,
55 include: [path.join(__dirname, 'src')],
56 use: ['babel-loader']
57 },
58 {
59 test: /\.ne$/,
60 use:['raw-loader']
61 }
62 ]
63 },
64 node: {
65 fs: 'empty',
66 net: 'empty',
67 tls: 'empty'
68 }
69};
\No newline at end of file