mirror of
https://github.com/zhigang1992/xverse-web-extension.git
synced 2026-04-30 21:52:45 +08:00
init wallet and user pref stores ans stx libraries
This commit is contained in:
@@ -6,8 +6,6 @@ process.env.ASSET_PATH = '/';
|
||||
var webpack = require('webpack'),
|
||||
config = require('../webpack.config');
|
||||
|
||||
delete config.xverseWallet;
|
||||
|
||||
config.mode = 'production';
|
||||
|
||||
webpack(config, function (err) {
|
||||
|
||||
@@ -9,6 +9,18 @@ const ReactRefreshTypeScript = require('react-refresh-typescript');
|
||||
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
|
||||
|
||||
|
||||
const aliases = {
|
||||
// alias stacks.js packages to their esm (default prefers /dist/polyfill)
|
||||
'@stacks/auth': '@stacks/auth/dist/esm',
|
||||
'@stacks/common': '@stacks/common/dist/esm',
|
||||
'@stacks/encryption': '@stacks/encryption/dist/esm',
|
||||
'@stacks/network': '@stacks/network/dist/esm',
|
||||
'@stacks/profile': '@stacks/profile/dist/esm',
|
||||
'@stacks/storage': '@stacks/storage/dist/esm',
|
||||
'@stacks/transactions': '@stacks/transactions/dist/esm',
|
||||
'@stacks/keychain': '@stacks/keychain/dist/esm',
|
||||
};
|
||||
|
||||
const ASSET_PATH = process.env.ASSET_PATH || '/';
|
||||
const SRC_ROOT_PATH = path.join(__dirname, '../', 'src');
|
||||
const BUILD_ROOT_PATH = path.join(__dirname, '../', 'build');
|
||||
@@ -72,6 +84,11 @@ var options = {
|
||||
extensions: fileExtensions
|
||||
.map((extension) => '.' + extension)
|
||||
.concat(['.js', '.jsx', '.ts', '.tsx', '.css']),
|
||||
alias: aliases,
|
||||
fallback: {
|
||||
stream: require.resolve('stream-browserify'),
|
||||
crypto: require.resolve('crypto-browserify')
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
new CleanWebpackPlugin({ verbose: false }),
|
||||
@@ -117,7 +134,11 @@ var options = {
|
||||
chunks: ['popup'],
|
||||
cache: false,
|
||||
}),
|
||||
new webpack.ProvidePlugin({
|
||||
Buffer: ['buffer', 'Buffer'],
|
||||
}),
|
||||
],
|
||||
|
||||
infrastructureLogging: {
|
||||
level: 'info',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user