diff options
Diffstat (limited to 'packages/forms/webpack.config.js')
-rw-r--r-- | packages/forms/webpack.config.js | 37 |
1 files changed, 3 insertions, 34 deletions
diff --git a/packages/forms/webpack.config.js b/packages/forms/webpack.config.js index 43deab722..8ad7ee3b6 100644 --- a/packages/forms/webpack.config.js +++ b/packages/forms/webpack.config.js | |||
@@ -1,41 +1,10 @@ | |||
1 | const path = require('path'); | 1 | const path = require('path'); |
2 | const TerserPlugin = require('terser-webpack-plugin'); | 2 | const baseConfig = require('../../webpack.config.base')(__dirname); |
3 | 3 | ||
4 | module.exports = { | 4 | module.exports = Object.assign({}, baseConfig, { |
5 | entry: path.join(__dirname, '/src/index.ts'), | ||
6 | context: __dirname, | ||
7 | output: { | 5 | output: { |
8 | filename: 'index.js', | 6 | filename: 'index.js', |
9 | path: path.join(__dirname, 'lib'), | 7 | path: path.join(__dirname, 'lib'), |
10 | libraryTarget: 'commonjs2', | 8 | libraryTarget: 'commonjs2', |
11 | }, | 9 | }, |
12 | module: { | 10 | }); |
13 | rules: [{ | ||
14 | test: /\.tsx?$/, | ||
15 | loader: 'ts-loader', | ||
16 | exclude: /node_modules/, | ||
17 | }], | ||
18 | }, | ||
19 | resolve: { | ||
20 | extensions: ['.tsx', '.ts', '.js'], | ||
21 | }, | ||
22 | externals: { | ||
23 | '@meetfranz/theme': '@meetfranz/theme', | ||
24 | lodash: { | ||
25 | commonjs: 'lodash', | ||
26 | commonjs2: 'lodash', | ||
27 | amd: 'lodash', | ||
28 | root: '_', | ||
29 | }, | ||
30 | classnames: 'classnames', | ||
31 | mobx: 'mobx', | ||
32 | mobxReact: 'mobx-react', | ||
33 | react: 'react', | ||
34 | reactJss: 'react-jss', | ||
35 | }, | ||
36 | devtool: 'inline-source-map', | ||
37 | optimization: { | ||
38 | minimizer: [new TerserPlugin()], | ||
39 | }, | ||
40 | mode: process.env.NODE_ENV === 'development' ? 'development' : 'production', | ||
41 | }; | ||