ghost-portal/packages/ui-react/webpack.config.js
Jaco Greeff 078e2e431a
Support enumerable accounts (#102)
Covert to TypeScript
2018-06-25 18:02:47 +02:00

51 lines
1.1 KiB
JavaScript

// 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: []
};