1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | 'use strict';
|
16 |
|
17 | let path = require('path');
|
18 | const webpack = require('webpack');
|
19 | const packageJson = require('./package.json');
|
20 |
|
21 | module.exports = {
|
22 | entry: {
|
23 | client: [
|
24 | './index.js'
|
25 | ]
|
26 | },
|
27 | output: {
|
28 | path: path.join(__dirname, 'umd'),
|
29 | filename: 'concerto-tools.js',
|
30 | library: 'concerto-tools',
|
31 | libraryTarget: 'umd',
|
32 | umdNamedDefine: true
|
33 | },
|
34 | plugins: [
|
35 | new webpack.BannerPlugin(`Concerto Tools v${packageJson.version}
|
36 | Licensed under the Apache License, Version 2.0 (the "License");
|
37 | you may not use this file except in compliance with the License.
|
38 | You may obtain a copy of the License at
|
39 | http://www.apache.org/licenses/LICENSE-2.0
|
40 | Unless required by applicable law or agreed to in writing, software
|
41 | distributed under the License is distributed on an "AS IS" BASIS,
|
42 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
43 | See the License for the specific language governing permissions and
|
44 | limitations 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 |