WIP: service worker importScripts compatible
This commit is contained in:
2
dist/safari-notifications.js
vendored
2
dist/safari-notifications.js
vendored
File diff suppressed because one or more lines are too long
@@ -469,7 +469,4 @@ async function getNotificationCount() {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export { getNotificationCount };
|
||||||
module.exports = {
|
|
||||||
getNotificationCount
|
|
||||||
};
|
|
||||||
|
|||||||
@@ -1,18 +1,22 @@
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
entry: './src/safari-notifications.js',
|
entry: './src/safari-notifications.js',
|
||||||
output: {
|
output: {
|
||||||
filename: 'safari-notifications.js',
|
filename: 'safari-notifications.js',
|
||||||
path: path.resolve(__dirname, 'dist'),
|
path: path.resolve(__dirname, 'dist'),
|
||||||
library: 'customModule',
|
libraryTarget: 'self'
|
||||||
libraryTarget: 'var'
|
},
|
||||||
},
|
optimization: {
|
||||||
mode: 'production',
|
splitChunks: {
|
||||||
target: 'webworker',
|
chunks: 'async'
|
||||||
resolve: {
|
}
|
||||||
fallback: {
|
},
|
||||||
"crypto": false // This might be needed if some module tries to access node's crypto, which is not available in browsers
|
mode: 'production',
|
||||||
|
target: 'webworker',
|
||||||
|
resolve: {
|
||||||
|
fallback: {
|
||||||
|
"crypto": false // This might be needed if some module tries to access node's crypto, which is not available in browsers
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user