cloudflare/d1-northwind

Public

mirrored fromhttps://github.com/cloudflare/d1-northwindAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
49ecdd5fc382c04610a23c90aaf55d5b8f3a8086

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

rollup.app.config.js

49lines · modecode

1import { terser } from "rollup-plugin-terser";
2// import { string } from "rollup-plugin-string";
3import { nodeResolve } from "@rollup/plugin-node-resolve";
4import commonjs from "@rollup/plugin-commonjs";
5import babel from "@rollup/plugin-babel";
6import postcss from "rollup-plugin-postcss";
7import postcssImport from "postcss-import";
8import tailwindcss from "tailwindcss";
9import autoprefixer from "autoprefixer";
10import postcssNested from "postcss-nested";
11import replace from "@rollup/plugin-replace";
12
13export default [
14 {
15 input: "app/index.jsx",
16 cache: true,
17 onwarn: function (message, warn) {
18 // https://github.com/rollup/rollup/wiki/Troubleshooting#this-is-undefined
19 if (message.code == "THIS_IS_UNDEFINED") return;
20 warn(message);
21 },
22 output: {
23 format: "iife",
24 file: "dist/app.js",
25 sourcemap: true,
26 },
27 plugins: [
28 babel({
29 presets: ["@babel/preset-react"],
30 babelHelpers: "bundled",
31 exclude: "node_modules/**",
32 compact: false,
33 }),
34 replace({
35 "process.env.NODE_ENV": JSON.stringify("production"),
36 preventAssignment: true,
37 }),
38 postcss({
39 plugins: [postcssImport(), tailwindcss(), autoprefixer(), postcssNested()],
40 extensions: [".css"],
41 extract: true,
42 minimize: true,
43 }),
44 commonjs(),
45 nodeResolve({ browser: true }),
46 terser(),
47 ],
48 },
49];
50