Skip to content

Commit c70deee

Browse files
committed
fix build order
1 parent 7777bf0 commit c70deee

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

rollup.config.js

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -21,31 +21,6 @@ const ts_plugin = is_publish
2121
const external = id => id.startsWith('svelte/');
2222

2323
export default [
24-
/* compiler.js */
25-
{
26-
input: 'src/compiler/index.ts',
27-
plugins: [
28-
replace({
29-
__VERSION__: pkg.version
30-
}),
31-
resolve(),
32-
commonjs({
33-
include: ['node_modules/**']
34-
}),
35-
json(),
36-
ts_plugin
37-
],
38-
output: {
39-
file: 'compiler.js',
40-
format: is_publish ? 'umd' : 'cjs',
41-
name: 'svelte',
42-
sourcemap: true,
43-
},
44-
external: is_publish
45-
? []
46-
: id => id === 'acorn' || id === 'magic-string' || id.startsWith('css-tree')
47-
},
48-
4924
/* runtime */
5025
{
5126
input: `src/runtime/index.ts`,
@@ -86,12 +61,37 @@ export default [
8661
ts_plugin,
8762
dir === 'internal' && {
8863
generateBundle(options, bundle) {
89-
const mod = bundle['internal.mjs'];
64+
const mod = bundle['index.mjs'];
9065
if (mod) {
91-
fs.writeFileSync('src/compile/internal-exports.ts', `// This file is automatically generated\nexport default new Set(${JSON.stringify(mod.exports)});`);
66+
fs.writeFileSync('src/compiler/compile/internal-exports.ts', `// This file is automatically generated\nexport default new Set(${JSON.stringify(mod.exports)});`);
9267
}
9368
}
9469
}
9570
]
96-
}))
71+
})),
72+
73+
/* compiler.js */
74+
{
75+
input: 'src/compiler/index.ts',
76+
plugins: [
77+
replace({
78+
__VERSION__: pkg.version
79+
}),
80+
resolve(),
81+
commonjs({
82+
include: ['node_modules/**']
83+
}),
84+
json(),
85+
ts_plugin
86+
],
87+
output: {
88+
file: 'compiler.js',
89+
format: is_publish ? 'umd' : 'cjs',
90+
name: 'svelte',
91+
sourcemap: true,
92+
},
93+
external: is_publish
94+
? []
95+
: id => id === 'acorn' || id === 'magic-string' || id.startsWith('css-tree')
96+
}
9797
];

0 commit comments

Comments
 (0)