Skip to content

Commit

Permalink
chore: fix get package version bug (#1441)
Browse files Browse the repository at this point in the history
* chore: fix get package version bug

* chore: version check
  • Loading branch information
iosh authored Nov 26, 2024
1 parent f713cf8 commit a7524a3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .yarn/versions/5e5da9b4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declined:
- helios
30 changes: 14 additions & 16 deletions scripts/webpack.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ const path = require('node:path')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const CopyPlugin = require('copy-webpack-plugin')
const {ProvidePlugin} = require('webpack')
const {ProvidePlugin, DefinePlugin} = require('webpack')
const {ProgressPlugin} = require('webpack')
const {EsbuildPlugin} = require('esbuild-loader')
const packageJson = require('../package.json')
const packagesPath = path.join(path.resolve(), './packages')
const devMode = process.env.NODE_ENV !== 'production'
Expand Down Expand Up @@ -110,11 +109,14 @@ const defaultConfig = {
https: false,
buffer: require.resolve('buffer/'),
stream: require.resolve('stream-browserify'),
process: 'process/browser',
process: 'process/browser',
},
alias: {
'/images': path.join(packagesPath, 'browser-extension/images'),
"js-conflux-sdk": path.join(path.resolve(), './node_modules/js-conflux-sdk'),
'js-conflux-sdk': path.join(
path.resolve(),
'./node_modules/js-conflux-sdk',
),
},
},
plugins: [
Expand All @@ -123,18 +125,14 @@ const defaultConfig = {
React: 'react',
process: 'process/browser.js',
}),
new EsbuildPlugin({
define: {
'process.env.NODE_DEBUG': JSON.stringify(
process.env.NODE_DEBUG || false,
),
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
'process.env.CI': JSON.stringify(process.env.CI || false),
'process.env.SENTRY_DSN': JSON.stringify(
process.env.SNOWPACK_PUBLIC_SENTRY_DSN || '',
),
'process.env.PACKAGE_VERSION': JSON.stringify(packageJson.version),
},
new DefinePlugin({
'process.env.NODE_DEBUG': JSON.stringify(process.env.NODE_DEBUG || false),
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
'process.env.CI': JSON.stringify(process.env.CI || false),
'process.env.SENTRY_DSN': JSON.stringify(
process.env.SNOWPACK_PUBLIC_SENTRY_DSN || '',
),
'process.env.PACKAGE_VERSION': JSON.stringify(packageJson.version),
}),
// Plugin to not generate js bundle for manifest entry
new HtmlWebpackPlugin({
Expand Down

0 comments on commit a7524a3

Please sign in to comment.