mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 23:35:03 +01:00
Add infrastructure to build and publish as wasm32 (#3840)
Co-authored-by: Ingvar Stepanyan <me@rreverser.com>
This commit is contained in:
@@ -12,7 +12,9 @@ const runtimePlatform = runtimePlatformArch();
|
||||
|
||||
const paths = [
|
||||
`../src/build/Release/sharp-${runtimePlatform}.node`,
|
||||
`@img/sharp-${runtimePlatform}/sharp.node`
|
||||
'../src/build/Release/sharp-wasm32.node',
|
||||
`@img/sharp-${runtimePlatform}/sharp.node`,
|
||||
'@img/sharp-wasm32/sharp.node'
|
||||
];
|
||||
|
||||
const errors = [];
|
||||
@@ -47,6 +49,8 @@ if (!module.exports) {
|
||||
help.push(` npm install --force @img/sharp-${runtimePlatform}`);
|
||||
} else {
|
||||
help.push(`- Manually install libvips >= ${minimumLibvipsVersion}`);
|
||||
help.push('- Add experimental WebAssembly-based dependencies:');
|
||||
help.push(' npm install --cpu=wasm32 sharp');
|
||||
}
|
||||
if (isLinux && /symbol not found/i.test(messages)) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user