diff options
author | 2019-01-08 21:41:11 +0100 | |
---|---|---|
committer | 2019-01-08 21:41:11 +0100 | |
commit | 6aab4ab890c0ca2f99bc615b7048533774f6ff68 (patch) | |
tree | 088d86001efa2a6d825ad51259a2df9b62b201fe /packages/theme/webpack.config.js | |
parent | wip (diff) | |
download | ferdium-app-6aab4ab890c0ca2f99bc615b7048533774f6ff68.tar.gz ferdium-app-6aab4ab890c0ca2f99bc615b7048533774f6ff68.tar.zst ferdium-app-6aab4ab890c0ca2f99bc615b7048533774f6ff68.zip |
Make packages work in electron, node and web
Diffstat (limited to 'packages/theme/webpack.config.js')
-rw-r--r-- | packages/theme/webpack.config.js | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/packages/theme/webpack.config.js b/packages/theme/webpack.config.js index f7311109d..8ad7ee3b6 100644 --- a/packages/theme/webpack.config.js +++ b/packages/theme/webpack.config.js | |||
@@ -1,25 +1,10 @@ | |||
1 | const path = require('path'); | 1 | const path = require('path'); |
2 | const baseConfig = require('../../webpack.config.base')(__dirname); | ||
2 | 3 | ||
3 | console.log(__dirname); | 4 | module.exports = Object.assign({}, baseConfig, { |
4 | |||
5 | module.exports = { | ||
6 | context: __dirname, | ||
7 | entry: path.join(__dirname, '/src/index.ts'), | ||
8 | output: { | 5 | output: { |
9 | filename: 'index.js', | 6 | filename: 'index.js', |
10 | path: path.join(__dirname, 'lib'), | 7 | path: path.join(__dirname, 'lib'), |
11 | libraryTarget: 'commonjs2', | 8 | libraryTarget: 'commonjs2', |
12 | }, | 9 | }, |
13 | module: { | 10 | }); |
14 | rules: [{ | ||
15 | test: /\.tsx?$/, | ||
16 | loader: 'ts-loader', | ||
17 | exclude: /node_modules/, | ||
18 | }], | ||
19 | }, | ||
20 | resolve: { | ||
21 | extensions: ['.tsx', '.ts', '.js'], | ||
22 | }, | ||
23 | devtool: 'inline-source-map', | ||
24 | mode: process.env.NODE_ENV === 'development' ? 'development' : 'production', | ||
25 | }; | ||