Skip to content

Commit 1996fda

Browse files
committedApr 29, 2018
Fix npm run build
1 parent 796bfce commit 1996fda

File tree

2 files changed

+34
-32
lines changed

2 files changed

+34
-32
lines changed
 

‎rollup.config.js

+32-29
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,38 @@ import uglify from 'rollup-plugin-uglify';
77
const production = !process.env.ROLLUP_WATCH;
88

99
export default {
10-
input: 'src/main.js',
11-
output: {
12-
sourcemap: true,
13-
format: 'iife',
14-
name: 'app',
15-
file: 'public/bundle.js'
16-
},
17-
plugins: [
18-
svelte({
19-
// enable run-time checks when not in production
20-
dev: !production,
21-
// we'll extract any component CSS out into
22-
// a separate file — better for performance
23-
css: css => {
24-
css.write('public/bundle.css');
25-
}
26-
}),
10+
input: 'src/main.js',
11+
output: {
12+
sourcemap: true,
13+
format: 'iife',
14+
name: 'app',
15+
file: 'public/bundle.js'
16+
},
17+
plugins: [
18+
svelte({
19+
// enable run-time checks when not in production
20+
dev: !production,
21+
// we'll extract any component CSS out into
22+
// a separate file — better for performance
23+
css: css => {
24+
css.write('public/bundle.css');
25+
}
26+
}),
2727

28-
// If you have external dependencies installed from
29-
// npm, you'll most likely need these plugins. In
30-
// some cases you'll need additional configuration —
31-
// consult the documentation for details:
32-
// https://github.com/rollup/rollup-plugin-commonjs
33-
resolve(),
34-
commonjs(),
28+
// If you have external dependencies installed from
29+
// npm, you'll most likely need these plugins. In
30+
// some cases you'll need additional configuration —
31+
// consult the documentation for details:
32+
// https://github.com/rollup/rollup-plugin-commonjs
33+
resolve(),
34+
commonjs(),
3535

36-
// If we're building for production (npm run build
37-
// instead of npm run dev), transpile and minify
38-
production && buble({ exclude: 'node_modules/**' }),
39-
production && uglify()
40-
]
36+
// If we're building for production (npm run build
37+
// instead of npm run dev), transpile and minify
38+
production && buble({
39+
exclude: 'node_modules/**',
40+
transforms: { forOf: false },
41+
}),
42+
production && uglify()
43+
]
4144
};

‎src/VisualPage.html

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ <h3>{pageNote.title}</h3>
77
{/if}
88
</div>
99
{/each}
10-
<div ref:page>
10+
<div ref:page style="padding-bottom: 113%;">
1111
{#if showImage}
1212
<img ref:img alt :src on:load="stupid()">
1313
{:else}
@@ -28,7 +28,7 @@ <h3>{pageNote.title}</h3>
2828
const poll = setInterval(() => {
2929
if (img.naturalWidth) {
3030
clearInterval(poll);
31-
page.style = `height: ${img.naturalHeight / img.naturalWidth * 100}%; padding-bottom: inherit;`;
31+
page.style = '';
3232
}
3333
}, 10);
3434
}
@@ -64,7 +64,6 @@ <h3>{pageNote.title}</h3>
6464
<style>
6565
ref:page {
6666
background: white;
67-
padding-bottom: 113%;
6867
width: 100%;
6968
position: relative;
7069
}

0 commit comments

Comments
 (0)
Please sign in to comment.