WIP React > Svelte
Put most of the developed design into Svelte
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import resolve from '@rollup/plugin-node-resolve'
|
||||
import replace from '@rollup/plugin-replace'
|
||||
import commonjs from '@rollup/plugin-commonjs'
|
||||
// import svelte from 'rollup-plugin-svelte'
|
||||
import svelte from 'rollup-plugin-svelte-hot'
|
||||
// import svelte from 'rollup-plugin-svelte'
|
||||
import babel from 'rollup-plugin-babel'
|
||||
// import { eslint } from 'rollup-plugin-eslint'
|
||||
// import browsersync from 'rollup-plugin-browsersync'
|
||||
import hmr from 'rollup-plugin-hot'
|
||||
import sveltePreprocess from 'svelte-preprocess'
|
||||
@@ -26,8 +27,11 @@ const preprocess = sveltePreprocess({
|
||||
postcss: true
|
||||
})
|
||||
|
||||
// Sapper Rollup config
|
||||
|
||||
export default {
|
||||
/*
|
||||
** Client
|
||||
*/
|
||||
client: {
|
||||
input: config.client.input(),
|
||||
output: {
|
||||
@@ -38,11 +42,11 @@ export default {
|
||||
plugins: [
|
||||
// Javascript
|
||||
svelte({
|
||||
// css: css => css.write('public/bundle.css'),
|
||||
dev,
|
||||
preprocess,
|
||||
hydratable: true,
|
||||
// emitCss: true,
|
||||
emitCss: !hot,
|
||||
// css: css => css.write('public/bundle.css'),
|
||||
...(!hot && {
|
||||
css: css => {
|
||||
css.write('public/bundle.css')
|
||||
@@ -67,6 +71,7 @@ export default {
|
||||
dedupe: ['svelte']
|
||||
}),
|
||||
commonjs(),
|
||||
// dev && eslint(),
|
||||
legacy && !hot && babel({
|
||||
extensions: ['.js', '.mjs', '.html', '.svelte'],
|
||||
exclude: ['node_modules/@babel/**'],
|
||||
@@ -86,6 +91,10 @@ export default {
|
||||
onwarn,
|
||||
},
|
||||
|
||||
|
||||
/*
|
||||
** Server
|
||||
*/
|
||||
server: {
|
||||
input: config.server.input(),
|
||||
output: config.server.output(),
|
||||
@@ -113,6 +122,10 @@ export default {
|
||||
onwarn,
|
||||
},
|
||||
|
||||
|
||||
/*
|
||||
** Service worker
|
||||
*/
|
||||
// serviceworker: {
|
||||
// input: config.serviceworker.input(),
|
||||
// output: config.serviceworker.output(),
|
||||
|
||||
Reference in New Issue
Block a user