-
-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1989a2b
commit c0d3009
Showing
19 changed files
with
312 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@farmfe/core": patch | ||
--- | ||
|
||
fix import meta glob path |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
crates/compiler/tests/fixtures/script/import_meta/url/glob/package_import_package/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
!node_modules |
2 changes: 2 additions & 0 deletions
2
crates/compiler/tests/fixtures/script/import_meta/url/glob/package_import_package/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// @ts-nocheck | ||
console.log(import.meta.glob("bar", import.meta.url)); |
1 change: 1 addition & 0 deletions
1
...fixtures/script/import_meta/url/glob/package_import_package/node_modules/@foo/core/foo.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
...xtures/script/import_meta/url/glob/package_import_package/node_modules/@foo/core/index.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
...es/script/import_meta/url/glob/package_import_package/node_modules/@foo/core/package.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
...sts/fixtures/script/import_meta/url/glob/package_import_package/node_modules/bar/index.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
...fixtures/script/import_meta/url/glob/package_import_package/node_modules/bar/package.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
87 changes: 87 additions & 0 deletions
87
crates/compiler/tests/fixtures/script/import_meta/url/glob/package_import_package/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
//bar_index_ce66.js: | ||
(function(_){var filename = ((function(){var _documentCurrentScript = typeof document !== "undefined" ? document.currentScript : null;return typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.src || new URL("bar_index_ce66.js", document.baseURI).href})());for(var r in _){_[r].__farm_resource_pot__=filename;window['__farm_default_namespace__'].__farm_module_system__.register(r,_[r])}})({"3b411c90":function (module, exports, farmRequire, farmDynamicRequire) { | ||
console.log({ | ||
"../@foo/core/foo.js": ()=>farmDynamicRequire("7546eb2a") | ||
}); | ||
} | ||
,}); | ||
|
||
//foo_482f.js: | ||
(function(_){var filename = ((function(){var _documentCurrentScript = typeof document !== "undefined" ? document.currentScript : null;return typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.src || new URL("foo_482f.js", document.baseURI).href})());for(var r in _){_[r].__farm_resource_pot__=filename;window['__farm_default_namespace__'].__farm_module_system__.register(r,_[r])}})({"7546eb2a":function (module, exports, farmRequire, farmDynamicRequire) { | ||
console.log("@foo/core/foo.js"); | ||
} | ||
,}); | ||
|
||
//index.js: | ||
window['__farm_default_namespace__'] = {__FARM_TARGET_ENV__: 'browser'};function _interop_require_default(obj) { | ||
return obj && obj.__esModule ? obj : { | ||
default: obj | ||
}; | ||
}function _export_star(from, to) { | ||
Object.keys(from).forEach(function(k) { | ||
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) { | ||
Object.defineProperty(to, k, { | ||
enumerable: true, | ||
get: function() { | ||
return from[k]; | ||
} | ||
}); | ||
} | ||
}); | ||
return from; | ||
}function _interop_require_wildcard(obj, nodeInterop) { | ||
if (!nodeInterop && obj && obj.__esModule) return obj; | ||
if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { | ||
default: obj | ||
}; | ||
var cache = _getRequireWildcardCache(nodeInterop); | ||
if (cache && cache.has(obj)) return cache.get(obj); | ||
var newObj = { | ||
__proto__: null | ||
}; | ||
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; | ||
for(var key in obj){ | ||
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { | ||
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; | ||
if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc); | ||
else newObj[key] = obj[key]; | ||
} | ||
} | ||
newObj.default = obj; | ||
if (cache) cache.set(obj, newObj); | ||
return newObj; | ||
}function _getRequireWildcardCache(nodeInterop) { | ||
if (typeof WeakMap !== "function") return null; | ||
var cacheBabelInterop = new WeakMap(); | ||
var cacheNodeInterop = new WeakMap(); | ||
return (_getRequireWildcardCache = function(nodeInterop) { | ||
return nodeInterop ? cacheNodeInterop : cacheBabelInterop; | ||
})(nodeInterop); | ||
}function __commonJs(mod) { | ||
var module; | ||
return () => { | ||
if (module) { | ||
return module.exports; | ||
} | ||
module = { | ||
exports: {}, | ||
}; | ||
if(typeof mod === "function") { | ||
mod(module, module.exports); | ||
}else { | ||
mod[Object.keys(mod)[0]](module, module.exports); | ||
} | ||
return module.exports; | ||
}; | ||
}((function(){var index_js_cjs = __commonJs((module, exports)=>{ | ||
"use strict"; | ||
console.log('runtime/index.js'); | ||
window['__farm_default_namespace__'].__farm_module_system__.setPlugins([]); | ||
}); | ||
index_js_cjs(); | ||
})());(function(_){var filename = ((function(){var _documentCurrentScript = typeof document !== "undefined" ? document.currentScript : null;return typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.src || new URL("index_dcdc.js", document.baseURI).href})());for(var r in _){_[r].__farm_resource_pot__=filename;window['__farm_default_namespace__'].__farm_module_system__.register(r,_[r])}})({"b5d64806":function (module, exports, farmRequire, farmDynamicRequire) { | ||
console.log({ | ||
"./node_modules/bar/index.js": ()=>farmDynamicRequire("3b411c90") | ||
}); | ||
} | ||
,});window['__farm_default_namespace__'].__farm_module_system__.setInitialLoadedResources([]);window['__farm_default_namespace__'].__farm_module_system__.setDynamicModuleResourcesMap([{ path: 'foo_482f.js', type: 0 },{ path: 'bar_index_ce66.js', type: 0 }],{ '7546eb2a': [0],'3b411c90': [1] });var farmModuleSystem = window['__farm_default_namespace__'].__farm_module_system__;farmModuleSystem.bootstrap();var entry = farmModuleSystem.require("b5d64806"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.