Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
es-dev-commonjs-transformer
Advanced tools
CommonJS Module transformer for the es-dev-server. It converts modules cjs -> esm format. Uses Rollup commonjs plugin under the hood.
// In
const a = require('dep');
...
module.exports = a;
// Out
import a from 'dep';
...
export default a;
//es-dev-server.config.js
import cjsTransformer from 'es-dev-commonjs-transformer';
module.exports = {
responseTransformers: [
cjsTransformer(/* Exclude Paths Array */ [
'**/node_modules/@open-wc/**/*',
...
])
]
}
The Open-wc karma setup requires you to exlude some paths from being processed by the cjs transformer. The following excludes seems to have worked for me.
//karma.conf.ts
const cjsTransformer = require('es-dev-commonjs-transformer');
const { createDefaultConfig } = require('@open-wc/testing-karma');
module.exports = config => {
let defaultConfig = createDefaultConfig(config);
...
esm: {
responseTransformers: [
cjsTransformer([
...defaultConfig.esm.babelModernExclude,
'**/node_modules/@open-wc/**/*',
'**/node_modules/chai-dom/**/*',
'**/node_modules/sinon-chai/**/*'
])
]
}
}
FAQs
CommonJS Module transformer for the es-dev-server
The npm package es-dev-commonjs-transformer receives a total of 45 weekly downloads. As such, es-dev-commonjs-transformer popularity was classified as not popular.
We found that es-dev-commonjs-transformer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.