We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c23997 commit 3f6b743Copy full SHA for 3f6b743
site/src/routes/repl/[id]/_components/AppControls/index.svelte
@@ -140,12 +140,12 @@
140
if (imports.length > 0) {
141
const idx = files.findIndex(({ path }) => path === 'package.json');
142
const pkg = JSON.parse(files[idx].data);
143
- const deps = {};
+ const { devDependencies } = pkg;
144
imports.forEach(mod => {
145
const match = /^(@[^/]+\/)?[^@/]+/.exec(mod);
146
- deps[match[0]] = 'latest';
+ devDependencies[match[0]] = 'latest';
147
});
148
- pkg.dependencies = deps;
+ pkg.devDependencies = devDependencies;
149
files[idx].data = JSON.stringify(pkg, null, ' ');
150
}
151
0 commit comments