ghost-portal/packages/apps-electron/webpack.renderer.cjs
Jaco 13b4cf808a
Ensure script tags appear in git diffs (#8992)
* Ensure script tags appear in git diffs

* Adjust for electron
2023-02-09 16:58:19 +02:00

42 lines
1.1 KiB
JavaScript

// Copyright 2017-2023 @polkadot/apps authors & contributors
// SPDX-License-Identifier: Apache-2.0
/* eslint-disable camelcase */
const CopyWebpackPlugin = require('copy-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const path = require('path');
const { merge } = require('webpack-merge');
const baseConfig = require('../apps/webpack.base.cjs');
const context = __dirname;
module.exports = merge(
baseConfig(context, 'development'),
{
plugins: [
// It must be placed before HtmlWebpackPlugin
new CopyWebpackPlugin({
patterns: [{
from: '../apps/public',
globOptions: {
dot: true,
ignore: ['**/index.html']
}
}]
}),
new HtmlWebpackPlugin({
PAGE_TITLE: 'Polkadot/Substrate Portal',
// see index.html for the work needed to support this,
// aka manually injection without minification
// (also in apps/webpack.config.js)
inject: false,
minify: false,
template: path.join(context, '../apps/public/index.html')
})
],
target: 'web'
}
);