tungsten 0.1.34 → 0.1.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/build/bundle.js
CHANGED
|
@@ -11,7 +11,7 @@ export async function bundle(projectDir, appConfig) {
|
|
|
11
11
|
let rootComponent = appConfig.rootComponent;
|
|
12
12
|
if (rootComponent.endsWith('.jsx')) rootComponent = rootComponent.slice(0, -1);
|
|
13
13
|
const externalModules = ['node-fetch'];
|
|
14
|
-
const command = `npx rollup --input "${join(projectDir, prodBuildFolder, clientFolder, 'client.js')}"` + ` --file "${join(projectDir, bundleFolder, 'client.js')}"` + ` --config "${join(frameworkDir, frameworkDistFolder, 'build/rollup.user.prod.config.js')}"` + (externalModules.length > 0 ? ` --external ${externalModules.join(',')}` : ``) + ` --inlineDynamicImports --format iife`;
|
|
14
|
+
const command = `cd ${frameworkDir} && npx rollup --input "${join(projectDir, prodBuildFolder, clientFolder, 'client.js')}"` + ` --file "${join(projectDir, bundleFolder, 'client.js')}"` + ` --config "${join(frameworkDir, frameworkDistFolder, 'build/rollup.user.prod.config.js')}"` + (externalModules.length > 0 ? ` --external ${externalModules.join(',')}` : ``) + ` --inlineDynamicImports --format iife`;
|
|
15
15
|
cliLog('build command:', command);
|
|
16
16
|
const subProcess = spawnShellCommand(command, {
|
|
17
17
|
cwd: frameworkDir /*cwd: projectDir*/ /*, stdio: 'inherit'*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"staticGen.d.ts","sourceRoot":"","sources":["../../src/staticGen/staticGen.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAchD,wBAAsB,SAAS,CAAC,SAAS,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"staticGen.d.ts","sourceRoot":"","sources":["../../src/staticGen/staticGen.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAchD,wBAAsB,SAAS,CAAC,SAAS,EAAE,SAAS,iBAgKnD"}
|
|
@@ -122,8 +122,8 @@ export async function staticGen(framework) {
|
|
|
122
122
|
}
|
|
123
123
|
console.log('rewriteMap', rewriteMap);
|
|
124
124
|
const copyPromises = [fsExtra.copy(join(buildLocation, staticFolder), join(projectDir, staticSiteFolder)),
|
|
125
|
-
//
|
|
126
|
-
fsExtra.copy(join(buildLocation, assetsFolder), join(projectDir, staticSiteFolder, 'assets')),
|
|
125
|
+
// assets folder
|
|
126
|
+
existsSync(join(buildLocation, publicFolder)) ? fsExtra.copy(join(buildLocation, assetsFolder), join(projectDir, staticSiteFolder, 'assets')) : null,
|
|
127
127
|
// public files
|
|
128
128
|
existsSync(join(buildLocation, publicFolder)) ? fsExtra.copy(join(buildLocation, publicFolder), join(projectDir, staticSiteFolder)) : null,
|
|
129
129
|
// copy in the bundle
|