1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-24 09:18:09 +00:00

fixed webpack config for local build

This commit is contained in:
Szymon Lesisz 2018-09-13 09:27:09 +02:00
parent 9c651669c8
commit c7cd4c9525

View File

@ -2,6 +2,7 @@ import webpack from 'webpack';
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import CopyWebpackPlugin from 'copy-webpack-plugin';
import MiniCssExtractPlugin from '../../trezor-connect/node_modules/mini-css-extract-plugin';
import {
TREZOR_CONNECT_ROOT,
@ -47,20 +48,17 @@ module.exports = {
{
test: /\.js?$/,
exclude: /node_modules/,
use: ['babel-loader'],
},
{
test: /\.less$/,
use: [
'babel-loader',
{
loader: 'eslint-loader',
options: {
emitWarning: true,
},
},
{
loader: 'stylelint-custom-processor-loader',
options: {
configPath: '.stylelintrc',
},
loader: MiniCssExtractPlugin.loader,
options: { publicPath: '../' },
},
`${TREZOR_CONNECT_ROOT}/node_modules/css-loader`,
`${TREZOR_CONNECT_ROOT}/node_modules/less-loader`,
],
},
{
@ -113,6 +111,11 @@ module.exports = {
hints: false,
},
plugins: [
new MiniCssExtractPlugin({
filename: '[name].css',
chunkFilename: '[id].css',
}),
new HtmlWebpackPlugin({
chunks: ['index'],
template: `${SRC}index.html`,