1 const path = require('path'); |
1 const path = require('path'); |
2 // const nodeExternals = require('webpack-node-externals'); |
2 // const nodeExternals = require('webpack-node-externals'); |
3 const MiniCssExtractPlugin = require('mini-css-extract-plugin'); |
3 const MiniCssExtractPlugin = require('mini-css-extract-plugin'); |
4 |
4 |
5 module.exports = { |
5 module.exports = { |
6 entry: path.resolve(__dirname, 'src/index.js'), |
6 entry: { |
|
7 pages: path.resolve(__dirname, 'src/pages'), |
|
8 layouts: path.resolve(__dirname, 'src/layouts'), |
|
9 reducers: path.resolve(__dirname, 'src/reducers'), |
|
10 ui: path.resolve(__dirname, 'src/ui'), |
|
11 actions: path.resolve(__dirname, 'src/actions.js'), |
|
12 }, |
|
13 // path.resolve(__dirname, 'src/index.js'), |
7 output: { |
14 output: { |
8 path: path.resolve(__dirname, 'lib'), |
15 path: path.resolve(__dirname, 'lib'), |
9 filename: 'dashboard-components.js', |
16 // filename: 'dashboard-components.[name].js', |
10 library: '', |
17 filename: '[name].js', |
11 libraryTarget: 'commonjs2', |
18 library: ['dashboard-components', '[name]'], |
|
19 libraryTarget: 'umd', |
12 }, |
20 }, |
13 resolve: { |
21 resolve: { |
14 extensions: ['.wasm', '.mjs', '.js', '.json', '.jsx'], |
22 extensions: ['.wasm', '.mjs', '.js', '.json', '.jsx'], |
15 }, |
23 }, |
16 // externals: [nodeExternals()], |
24 // externals: [nodeExternals()], |