File tree Expand file tree Collapse file tree 1 file changed +8
-40
lines changed
packages/plugin-vite/src/plugins/patches Expand file tree Collapse file tree 1 file changed +8
-40
lines changed Original file line number Diff line number Diff line change @@ -707,50 +707,18 @@ const node_events_1 = __importDefault(_mod.default ?? _mod);`,
707707
708708Deno . test ( "commonjs imitating esm - default export exists" , ( ) => {
709709 runTest ( {
710- input : `var replace = String.prototype.replace;
711- var percentTwenties = /%20/g;
712-
713- var Format = {
714- RFC3986: 'RFC3986'
715- };
716-
717- module.exports = {
718- 'default': Format.RFC3986,
719- formatters: {
720- RFC3986: function (value) {
721- return String(value);
722- }
723- },
724- RFC3986: Format.RFC3986
710+ input : `module.exports = {
711+ 'default': 'string',
712+ otherExport: 1
725713};
726714` ,
727- expected : `var exports = {},
728- module = {};
729- Object.defineProperty(module, "exports", {
730- get() {
731- return exports;
732- },
733- set(value) {
734- exports = value;
735- }
736- });
737- var replace = String.prototype.replace;
738- var percentTwenties = /%20/g;
739- var Format = {
740- RFC3986: 'RFC3986'
741- };
715+ expected : `${ INIT }
742716module.exports = {
743- 'default': Format.RFC3986,
744- formatters: {
745- RFC3986: function (value) {
746- return String(value);
747- }
748- },
749- RFC3986: Format.RFC3986
717+ 'default': 'string',
718+ otherExport: 1
750719};
751- var _formatters = exports.formatters;
752- var _RFC = exports.RFC3986;
753- export { _formatters as formatters, _RFC as RFC3986 };
720+ var _otherExport = exports.otherExport;
721+ export { _otherExport as otherExport };
754722${ DEFAULT_EXPORT }
755723${ DEFAULT_EXPORT_END } `,
756724 } ) ;
You can’t perform that action at this time.
0 commit comments