Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | const path = require('path'); const docs = require('./docs-list'); const basePath = path.resolve(__dirname, '../../../'); const babelLoader = { loader: 'babel-loader', options: { babelrc: false, presets: ['@babel/preset-env', '@babel/preset-react'], }, }; const config = { entry: docs, context: basePath, mode: 'development', // devtool: 'inline-source-map', resolve: { extensions: ['.js', '.jsx'], }, output: { libraryTarget: 'commonjs2', filename: '[name].js', path: path.resolve(__dirname, '../../../dist/__internal/docs'), }, externals: { react: 'react', 'react-dom': 'react-dom', 'prop-types': 'prop-types', classnames: 'classnames', }, optimization: { splitChunks: { cacheGroups: { vendors: { test: /[\\/]node_modules[\\/]/, name: 'vendors', chunks: 'all', reuseExistingChunk: true, }, commons: { name: 'commons', chunks: 'all', minChunks: 3, reuseExistingChunk: true, }, }, }, }, module: { rules: [ { test: /\.jsx?$/, include: [basePath], exclude: /node_modules/, use: [babelLoader], }, { test: /\.mdx$/, include: [basePath], exclude: /node_modules/, use: [babelLoader, '@mdx-js/loader'], }, ], }, }; // environment-based adjustments // if (NODE_ENV === 'production') { // config.mode = 'production'; // } module.exports = config; |