Mikolaj
04/03/2024, 1:31 PMMikolaj
04/04/2024, 8:32 AMwebpack.config.d
folder to run in secure context:
function setupDevServer(callback) {
const devCerts = require('office-addin-dev-certs');
devCerts.getHttpsServerOptions()
.then(httpsOptions => {
const serverOptions = {
headers: {
"Access-Control-Allow-Origin": "*",
},
server: {
type: 'https',
options: {
ca: <http://httpsOptions.ca|httpsOptions.ca>,
key: httpsOptions.key,
cert: httpsOptions.cert
}
},
open: false
};
callback(serverOptions);
})
.catch(error => {
console.error("Error obtaining HTTPS options:", error);
callback({});
});
}
setupDevServer(devServerOptions => {
config.devServer = Object.assign({}, config.devServer || {}, devServerOptions);
});
Also it is required to add npm dependency in jsMain target as such:
jsMain.dependencies {
implementation(npm("office-addin-dev-certs", "1.12.2"))
}
Mike Dawson
04/05/2024, 11:59 AMMike Dawson
04/05/2024, 12:00 PMMikolaj
04/05/2024, 12:07 PMMike Dawson
04/05/2024, 12:07 PMMikolaj
04/05/2024, 12:09 PMMikolaj
04/05/2024, 12:10 PMMike Dawson
04/05/2024, 12:12 PMMikolaj
04/05/2024, 12:15 PMkotlin/js
plugin to extend webpack config generated by said plugin and ran it using gradle. Not sure where else should I post it 🤔 The question may be misleading but the result is 100% applicable in kotlin/jsMike Dawson
04/05/2024, 12:22 PM