Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions crates/pack-tests/tests/snapshot/basic/alias/output/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([
typeof document === "object" ? document.currentScript : undefined,
{"otherChunks":["_project___de7ba625.js","input_index_less_cbfc5ad5.css"],"runtimeModuleIds":["[project]/basic/alias/input/index.ts [client] (ecmascript)"]}
{"otherChunks":["_project___549cc07f.js","input_index_less_cbfc5ad5.css"],"runtimeModuleIds":["[project]/basic/alias/input/index.ts [client] (ecmascript)"]}
]);
// Dummy runtime
// Dummy runtime
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"config": {
"entry": [
{
"import": "input/index.js",
"name": "main"
}
],
"optimization": {
"concatenateModules": true,
"minify": false,
"moduleIds": "named"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const appConfig = {
name: 'from-config',
appId: '123'
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { getTernIndexAppProps } from './site-runtime.js';
import { readLocalName } from './micro-app.js';

console.log(getTernIndexAppProps(), readLocalName());
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const appConfig = {
name: 'from-local',
};

export function readLocalName() {
return appConfig.name;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { appConfig } from './config.js';

export function transformProxyUrl(originPath) {
var ternAppConfig = appConfig;

return ternAppConfig.name + ':' + originPath;
}

export function getTernIndexAppProps() {
var yuyanId = appConfig.yuyanId, appName = appConfig.name;

return appName + ':' + yuyanId;
}

export function unusedTernExport() {
return 'unused';
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { appConfig } from './config.js';
import { getTernIndexAppProps as readFromSdk } from './sdk.js';

appConfig;

export function getTernIndexAppProps() {
return readFromSdk();
}
Loading
Loading