Skip to content

Commit

Permalink
chore: bundle css
Browse files Browse the repository at this point in the history
  • Loading branch information
Xmader committed Nov 12, 2020
1 parent 844358d commit ecd7f90
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
9 changes: 9 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"rollup-plugin-node-builtins": "^2.1.2",
"rollup-plugin-node-globals": "^1.4.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-string": "^3.0.0",
"rollup-plugin-typescript": "^1.0.1",
"tslib": "^1.10.0",
"typescript": "^4.1.1-rc"
Expand Down
6 changes: 5 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import commonjs from "rollup-plugin-commonjs"
import builtins from "rollup-plugin-node-builtins"
import nodeGlobals from "rollup-plugin-node-globals"
import json from "@rollup/plugin-json"
import { string } from "rollup-plugin-string"
import fs from "fs"

const getBannerText = () => {
Expand Down Expand Up @@ -33,6 +34,9 @@ const plugins = [
extensions: [".js", ".ts"]
}),
json(),
string({
include: "**/*.css",
}),
builtins(),
nodeGlobals({
dirname: false,
Expand All @@ -45,7 +49,7 @@ const plugins = [
* @param {string} code
* @param {string} id
*/
transform(code, id) {
transform (code, id) {
if (id.includes("tslib")) {
code = code.split(/\r?\n/g).slice(15).join("\n")
}
Expand Down

0 comments on commit ecd7f90

Please sign in to comment.