| 2 | const path = require("path"); |
| 3 | |
| 4 | const createConfig = () => { |
| 5 | return { |
| 6 | mode: "production", |
| 7 | devtool: "source-map", |
| 8 | context: path.resolve(__dirname), |
| 9 | entry: { |
| 10 | index: `./src/index.ts` |
| 11 | }, |
| 12 | target: "web", |
| 13 | output: { |
| 14 | path: path.resolve(__dirname, "lib"), |
| 15 | filename: "bundle.js", |
| 16 | library: "dfd" |
| 17 | }, |
| 18 | module: { |
| 19 | rules: [ |
| 20 | { |
| 21 | test: /\.tsx?$/, |
| 22 | use: [ 'ts-loader', 'ify-loader' ], |
| 23 | exclude: /node_modules/ |
| 24 | } |
| 25 | ] |
| 26 | }, |
| 27 | resolve: { |
| 28 | extensions: [ '.tsx', '.ts', '.js' ] |
| 29 | } |
| 30 | }; |
| 31 | }; |
| 32 | |
| 33 | module.exports = [ |
| 34 | createConfig() |