Compare commits

..

3 Commits

Author SHA1 Message Date
Richard Harris
f66c7dcb0d -> v0.24.2 2018-12-31 11:45:20 -05:00
Rich Harris
06f1a0e6c0 Merge pull request #541 from sveltejs/rollup-1.0
support Rollup 1.0
2018-12-31 11:44:22 -05:00
Conduitry
7726325b4b support Rollup 1.0 2018-12-31 11:14:49 -05:00
3 changed files with 8 additions and 2 deletions

View File

@@ -1,5 +1,9 @@
# sapper changelog
## 0.24.2
* Support Rollup 1.0 ([#541](https://github.com/sveltejs/sapper/pull/541))
## 0.24.1
* Include CSS chunks in webpack build info to avoid duplication ([#529](https://github.com/sveltejs/sapper/pull/529))

View File

@@ -1,6 +1,6 @@
{
"name": "sapper",
"version": "0.24.1",
"version": "0.24.2",
"description": "Military-grade apps, engineered by Svelte",
"bin": {
"sapper": "./sapper"

View File

@@ -142,12 +142,14 @@ export default class RollupCompiler {
const bundle = await rollup.rollup({
input,
inlineDynamicImports: true,
external: (id: string) => {
return (id[0] !== '.' && !path.isAbsolute(id)) || id.slice(-5, id.length) === '.json';
}
});
const { code } = await bundle.generate({ format: 'cjs' });
const resp = await bundle.generate({ format: 'cjs' });
const { code } = resp.output ? resp.output[0] : resp;
// temporarily override require
const defaultLoader = require.extensions['.js'];