Skip to content

Commit cdffb83

Browse files
committed
Fix the constant in the build
1 parent 06a731d commit cdffb83

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tools/build.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ const main = async () => {
3939
to: LOCAL_NODE_MODULES.map(mod => `import(\`\${pathToFileURL(getProjectPath())}/node_modules/${mod}\`)`),
4040
});
4141

42-
const { devDependencies } = await readJSON('package.json');
42+
const { devDependencies, version } = await readJSON('package.json');
4343
const from = ['__FIREBASE_FRAMEWORKS_VERSION__'];
44-
const to = [`file://${process.cwd()}`];
44+
const to = [version];
4545
for (const [dep, version] of Object.entries<Record<string, string>>(devDependencies)) {
4646
from.push(`__${dep.toUpperCase().replace(/[^A-Z]/g, '_')}_VERSION__`);
4747
to.push(version as any);

tools/dev.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ const run = async () => {
1212
const path = join(process.cwd(), `${name}-${version}.tgz`);
1313
await replaceInFile({
1414
files: 'dist/constants.js',
15-
from: /^exports\.FIREBASE_FRAMEWORKS_VERSION = .*$/gm,
16-
to: `exports.FIREBASE_FRAMEWORKS_VERSION = 'file:${path}';`,
15+
from: /^export const FIREBASE_FRAMEWORKS_VERSION = .*$/gm,
16+
to: `export const FIREBASE_FRAMEWORKS_VERSION = 'file:${path}';`,
1717
});
1818
await exec('npm pack .');
1919
const npmRoot = await exec('npm -g root');

0 commit comments

Comments
 (0)