Files
pyscript/pyscriptjs/rollup.config.js
Fabio Pliger fcaa57307f See you later tailwind (#452)
* start removing tailwind and rebuilding some css

* add css to pybox and add class to repl

* set output component visibility

* replace tailwind class with single component class

* add styles to css

* replace classes on  button

* replace classes on input

* replace classes in title

* replace classes on list

* replace classes

* add new style file

* add list element style

* remove tailwind classes from todo example

* revert link on examples files

* remove tailwind config files

* remove commented old code

* add missing ;
2022-06-24 18:30:07 -05:00

68 lines
1.6 KiB
JavaScript

import svelte from "rollup-plugin-svelte";
import commonjs from "@rollup/plugin-commonjs";
import resolve from "@rollup/plugin-node-resolve";
import livereload from "rollup-plugin-livereload";
import { terser } from "rollup-plugin-terser";
import sveltePreprocess from "svelte-preprocess";
import typescript from "@rollup/plugin-typescript";
import css from "rollup-plugin-css-only";
import serve from "rollup-plugin-serve";
import { string } from "rollup-plugin-string";
const production = !process.env.ROLLUP_WATCH || (process.env.NODE_ENV === "production");
export default {
input: "src/main.ts",
output:[
{
sourcemap: true,
format: "iife",
name: "app",
file: "examples/build/pyscript.js",
},
{
file: "examples/build/pyscript.min.js",
format: "iife",
sourcemap: true,
plugins: [terser()],
},
],
plugins: [
svelte({
// add postcss config
preprocess: sveltePreprocess({
postcss: {
plugins: [require("autoprefixer")],
},
}),
compilerOptions: {
dev: !production,
},
}),
css({ output: "pyscript.css" }),
// Bundle all the Python files into the output file
string({
include: "./src/**/*.py",
}),
resolve({
browser: true,
dedupe: ["svelte"],
}),
commonjs(),
typescript({
sourceMap: !production,
inlineSources: !production,
}),
!production && serve(),
!production && livereload("public"),
// production && terser(),
!production && serve({
port: 8080,
contentBase: 'examples'}
)
],
watch: {
clearScreen: false,
},
};