Add svelte as a view engine to swaf #33
@ -1,6 +1,5 @@
|
|||||||
import path from "path";
|
import path from "path";
|
||||||
import svelte from "rollup-plugin-svelte";
|
import svelte from "rollup-plugin-svelte";
|
||||||
import {sveltePreprocess} from "svelte-preprocess/dist/autoProcess";
|
|
||||||
import cssOnlyRollupPlugin from "rollup-plugin-css-only";
|
import cssOnlyRollupPlugin from "rollup-plugin-css-only";
|
||||||
import resolve from "@rollup/plugin-node-resolve";
|
import resolve from "@rollup/plugin-node-resolve";
|
||||||
import commonjs from "@rollup/plugin-commonjs";
|
import commonjs from "@rollup/plugin-commonjs";
|
||||||
@ -29,11 +28,6 @@ export default commandLineArgs => ({
|
|||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
svelte({
|
svelte({
|
||||||
preprocess: sveltePreprocess({
|
|
||||||
typescript: {
|
|
||||||
tsconfigFile: 'tsconfig.svelte.json',
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
compilerOptions: {
|
compilerOptions: {
|
||||||
dev: !production,
|
dev: !production,
|
||||||
hydratable: true,
|
hydratable: true,
|
||||||
@ -55,7 +49,7 @@ export default commandLineArgs => ({
|
|||||||
commonjs(),
|
commonjs(),
|
||||||
|
|
||||||
// Live reload in dev
|
// Live reload in dev
|
||||||
!production && !!commandLineArgs.watch && livereloadRollupPlugin('public'),
|
!production && !!commandLineArgs.watch && livereloadRollupPlugin(publicDir),
|
||||||
|
|
||||||
// Minify in production
|
// Minify in production
|
||||||
production && terser(),
|
production && terser(),
|
||||||
|
Loading…
Reference in New Issue
Block a user