|
4 | 4 | * This source code is licensed under the MIT license found in the |
5 | 5 | * LICENSE file in the root directory of this source tree. |
6 | 6 | */ |
7 | | -'use strict'; |
| 7 | +"use strict"; |
8 | 8 |
|
9 | | -const path = require('path'); |
10 | | -const webpack = require('webpack'); |
| 9 | +const path = require("path"); |
| 10 | +const webpack = require("webpack"); |
11 | 11 |
|
12 | 12 | module.exports = { |
13 | | - entry: './src/iframeScript.js', |
| 13 | + entry: "./src/iframeScript.js", |
14 | 14 | output: { |
15 | | - path: path.join(__dirname, './lib'), |
16 | | - filename: 'iframe-bundle.js', |
| 15 | + path: path.join(__dirname, "./lib"), |
| 16 | + filename: "iframe-bundle.js" |
17 | 17 | }, |
18 | 18 | module: { |
19 | 19 | rules: [ |
20 | 20 | { |
21 | 21 | test: /\.js$/, |
22 | | - include: path.resolve(__dirname, './src'), |
23 | | - use: 'babel-loader', |
24 | | - }, |
25 | | - ], |
| 22 | + include: path.resolve(__dirname, "./src"), |
| 23 | + use: "babel-loader" |
| 24 | + } |
| 25 | + ] |
26 | 26 | }, |
27 | 27 | plugins: [ |
28 | 28 | new webpack.DefinePlugin({ |
29 | 29 | // We set process.env.NODE_ENV to 'production' so that React is built |
30 | 30 | // in production mode. |
31 | | - 'process.env': { NODE_ENV: '"production"' }, |
| 31 | + "process.env": { NODE_ENV: '"production"' }, |
32 | 32 | // This prevents our bundled React from accidentally hijacking devtools. |
33 | | - __REACT_DEVTOOLS_GLOBAL_HOOK__: '({})', |
| 33 | + __REACT_DEVTOOLS_GLOBAL_HOOK__: "__REACT_ERROR_OVERLAY_GLOBAL_HOOK_NOOP__" |
34 | 34 | }), |
35 | 35 | // This code is embedded as a string, so it would never be optimized |
36 | 36 | // elsewhere. |
37 | 37 | new webpack.optimize.UglifyJsPlugin({ |
38 | 38 | compress: { |
39 | 39 | warnings: false, |
40 | | - comparisons: false, |
| 40 | + comparisons: false |
41 | 41 | }, |
42 | 42 | output: { |
43 | 43 | comments: false, |
44 | | - ascii_only: false, |
45 | | - }, |
46 | | - }), |
47 | | - ], |
| 44 | + ascii_only: false |
| 45 | + } |
| 46 | + }) |
| 47 | + ] |
48 | 48 | }; |
0 commit comments