// Copyright 2017-2018 @polkadot/ui-react authors & contributors // This software may be modified and distributed under the terms // of the ISC license. See the LICENSE file for details. const path = require('path'); const ENV = process.env.NODE_ENV || 'development'; const isProd = ENV === 'production'; module.exports = { context: __dirname, devtool: isProd ? 'source-map' : 'cheap-eval-source-map', entry: './src/demo.tsx', mode: ENV, output: { path: __dirname, filename: './demo.js' }, resolve: { alias: { '@polkadot/ui-identicon/index': path.resolve(__dirname, '../ui-identicon/src/index.ts') }, extensions: ['.js', '.jsx', '.ts', '.tsx'] }, module: { rules: [ { test: /\.css$/, exclude: /(node_modules)/, use: [ 'style-loader', { loader: 'css-loader', options: { importLoaders: 1 } }, 'postcss-loader' ] }, { test: /\.(js|ts|tsx)$/, exclude: /(node_modules)/, use: { loader: 'babel-loader' } } ] }, plugins: [] };