Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue/#415 #964

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 18 additions & 86 deletions package-lock.json

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,18 @@
"repository": {
"type": "git",
"url": "https://github.com/accordproject/concerto"
},
"dependencies": {
"browserify-zlib": "^0.2.0",
"buffer": "^6.0.3",
"concerto": "file:",
"crypto-browserify": "^3.12.1",
"https-browserify": "^1.0.0",
"os-browserify": "^0.3.0",
"path-browserify": "^1.0.1",
"process": "^0.11.10",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"util": "^0.12.5"
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
"name": "test-archive",
"version": "0.0.1",
"description": "A test business network.",
"customKey": "custom value"
"customKey": "custom value",
"dependencies": {
"test-archive": "file:"
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
"name": "test-archive",
"version": "0.0.1",
"description": "A test business network.",
"customKey": "custom value"
"customKey": "custom value",
"dependencies": {
"test-archive": "file:"
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
"name": "test-archive",
"version": "0.0.1",
"description": "A test business network.",
"customKey": "custom value"
"customKey": "custom value",
"dependencies": {
"test-archive": "file:"
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"name": "test-import",
"version": "0.0.1",
"description": "Test Imports",
"license": "Apache-2.0"
}

"license": "Apache-2.0",
"dependencies": {
"test-import": "file:"
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.0.1",
"description": "A test business network using npm model dependencies.",
"dependencies": {
"animaltracking-model": "0.0.7"
}
"animaltracking-model": "0.0.7",
"test-npm-archive": "file:"
}
}
52 changes: 26 additions & 26 deletions packages/concerto-core/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@

'use strict';

let path = require('path');
const path = require('path');
const webpack = require('webpack');
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin'); // For minification

const packageJson = require('./package.json');

module.exports = {
mode: 'production', // Explicit production mode for optimization
entry: './index.js',
output: {
path: path.resolve(__dirname, 'dist'),
Expand All @@ -43,48 +45,46 @@ module.exports = {
limitations under the License.`),
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify('production')
}
}),
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
'NODE_ENV': JSON.stringify('production'),
},
}),
new webpack.ProvidePlugin({
process: 'process/browser', // provide a shim for the global `process` variable
Buffer: ['buffer', 'Buffer'], // Polyfill Buffer
process: 'process/browser', // Shim global process variable
}),
new NodePolyfillPlugin(),
new NodePolyfillPlugin(), // Add polyfills for Node.js core modules
],

module: {
rules: [
{
test: /\.js$/,
include: [path.join(__dirname, 'lib')],
use: ['babel-loader']
use: ['babel-loader'], // Transpile JavaScript files
},
{
test: /\.ne$/,
use: ['raw-loader']
}
]
use: ['raw-loader'], // Handle raw `.ne` files
},
],
},
resolve: {
fallback: {
// Webpack 5 no longer polyfills Node.js core modules automatically.
// see https://webpack.js.org/configuration/resolve/#resolvefallback
// for the list of Node.js core module polyfills.
// Polyfills for Node.js core modules
'fs': false,
'tls': false,
'net': false,
'child_process': false,
'os': false,
'path': false,
// 'crypto': require.resolve('crypto-browserify'),
// 'stream': require.resolve('stream-browserify'),
// 'http': require.resolve('stream-http'),
// 'https': require.resolve('https-browserify'),
// 'zlib': require.resolve('browserify-zlib'),
// 'vm2': require.resolve('vm-browserify'),
}
}
'os': require.resolve('os-browserify/browser'),
'path': require.resolve('path-browserify'),
'crypto': require.resolve('crypto-browserify'),
'stream': require.resolve('stream-browserify'),
'http': require.resolve('stream-http'),
'https': require.resolve('https-browserify'),
'zlib': require.resolve('browserify-zlib'),
},
},
optimization: {
minimize: true,
minimizer: [new TerserPlugin()], // Minify output using Terser
},
};
Loading