mirror of
https://github.com/trezor/trezor-suite.git
synced 2026-03-24 16:17:15 +01:00
chore(connect-iframe): fix conflicting variable webpack warning on build:lib
This commit is contained in:
@@ -17,7 +17,7 @@ const commitHash =
|
||||
|
||||
export const config: webpack.Configuration = {
|
||||
target: 'web',
|
||||
mode: 'production',
|
||||
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
@@ -30,7 +30,6 @@ export const config: webpack.Configuration = {
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
test: (input: string) => input.includes('background-sharedworker'),
|
||||
loader: 'worker-loader',
|
||||
@@ -131,13 +130,8 @@ export const config: webpack.Configuration = {
|
||||
],
|
||||
}),
|
||||
new webpack.DefinePlugin({
|
||||
process: {
|
||||
env: {
|
||||
VERSION: JSON.stringify(version),
|
||||
COMMIT_HASH: JSON.stringify(commitHash),
|
||||
NODE_ENV: JSON.stringify(process.env.NODE_ENV),
|
||||
},
|
||||
},
|
||||
'process.env.VERSION': JSON.stringify(version),
|
||||
'process.env.COMMIT_HASH': JSON.stringify(commitHash),
|
||||
}),
|
||||
],
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ const DIST = path.resolve(__dirname, '../build');
|
||||
|
||||
export const config: webpack.Configuration = {
|
||||
target: 'web',
|
||||
mode: 'production',
|
||||
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
|
||||
entry: {
|
||||
core: path.resolve(__dirname, '../../connect/src/core/index.ts'),
|
||||
},
|
||||
|
||||
@@ -14,7 +14,7 @@ const commitHash = execSync('git rev-parse HEAD').toString().trim();
|
||||
|
||||
const config: webpack.Configuration = {
|
||||
target: 'web',
|
||||
mode: 'production',
|
||||
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
|
||||
entry: {
|
||||
popup: path.resolve(__dirname, '../src/index.tsx'),
|
||||
log: path.resolve(__dirname, '../src/log.tsx'),
|
||||
@@ -73,7 +73,6 @@ const config: webpack.Configuration = {
|
||||
new DefinePlugin({
|
||||
'process.env.VERSION': JSON.stringify(version),
|
||||
'process.env.COMMIT_HASH': JSON.stringify(commitHash),
|
||||
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
chunks: ['popup'],
|
||||
|
||||
Reference in New Issue
Block a user