Skip to content

Instantly share code, notes, and snippets.

@azu
Last active Jan 12, 2022
Embed
What would you like to do?
webpack 5.66.0 add library type: commonjs-static
"use strict";
var __webpack_require__ = {
d: (_, e) => {
for (var r in e) __webpack_require__.o(e, r) && !__webpack_require__.o(_, r) && Object.defineProperty(_, r, {
enumerable: !0,
get: e[r]
})
}, o: (_, e) => Object.prototype.hasOwnProperty.call(_, e), r: _ => {
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(_, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(_, "__esModule", { value: !0 })
}
}, __webpack_exports__ = {};
__webpack_require__.r(__webpack_exports__), __webpack_require__.d(__webpack_exports__, {
namedFn: () => namedFn,
default: () => __WEBPACK_DEFAULT_EXPORT__
});
const namedFn = () => {
}, __WEBPACK_DEFAULT_EXPORT__ = () => {
};
module.exports = __webpack_exports__;
"use strict";
var __webpack_require__ = {
d: (e, _) => {
for (var r in _) __webpack_require__.o(_, r) && !__webpack_require__.o(e, r) && Object.defineProperty(e, r, {
enumerable: !0,
get: _[r]
})
}, o: (e, _) => Object.prototype.hasOwnProperty.call(e, _), r: e => {
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, "__esModule", { value: !0 })
}
}, __webpack_exports__ = {};
__webpack_require__.r(__webpack_exports__), __webpack_require__.d(__webpack_exports__, {
namedFn: () => namedFn,
default: () => __WEBPACK_DEFAULT_EXPORT__
});
const namedFn = () => {
}, __WEBPACK_DEFAULT_EXPORT__ = () => {
};
exports.default = __webpack_exports__.default, exports.namedFn = __webpack_exports__.namedFn, Object.defineProperty(exports, "__esModule", { value: !0 });
const path = require('path');
const config = {
entry: './src/index.mjs',
output: {
uniqueName: "commonjs-static-external",
filename: "commonjs-static-external.js",
// https://github.com/webpack/webpack/releases/tag/v5.66.0
libraryTarget: "commonjs-module",
iife: false
},
};
module.exports = () => {
return config;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment