Files
pezkuwi-ui/packages/react-identicon/webpack.config.js
T
Jaco Greeff 7251b1f763 Cleanup shared, consistency with standards (#309)
* Cleanup shared, consistency with standards

* Re-add item

* Cleanup webpack demos
2020-04-12 09:06:32 +02:00

39 lines
973 B
JavaScript

// Copyright 2017-2020 @polkadot/react-identicon authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 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,
module: {
rules: [
{
exclude: /(node_modules)/,
test: /\.(js|ts|tsx)$/,
use: [
'babel-loader'
]
}
]
},
output: {
filename: './Demo.js',
path: path.join(__dirname, 'build')
},
plugins: [],
resolve: {
alias: {
'@polkadot/ui-settings': path.resolve(__dirname, '../ui-settings/build'),
'@polkadot/ui-shared': path.resolve(__dirname, '../ui-shared/build')
},
extensions: ['.js', '.jsx', '.ts', '.tsx']
}
};