chore: bundle css
This commit is contained in:
parent
844358d9a6
commit
ecd7f909a4
3 changed files with 15 additions and 1 deletions
9
package-lock.json
generated
9
package-lock.json
generated
|
@ -1662,6 +1662,15 @@
|
|||
"rollup-pluginutils": "^2.8.1"
|
||||
}
|
||||
},
|
||||
"rollup-plugin-string": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/rollup-plugin-string/-/rollup-plugin-string-3.0.0.tgz",
|
||||
"integrity": "sha512-vqyzgn9QefAgeKi+Y4A7jETeIAU1zQmS6VotH6bzm/zmUQEnYkpIGRaOBPY41oiWYV4JyBoGAaBjYMYuv+6wVw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"rollup-pluginutils": "^2.4.1"
|
||||
}
|
||||
},
|
||||
"rollup-plugin-typescript": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/rollup-plugin-typescript/-/rollup-plugin-typescript-1.0.1.tgz",
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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 = () => {
|
||||
|
@ -33,6 +34,9 @@ const plugins = [
|
|||
extensions: [".js", ".ts"]
|
||||
}),
|
||||
json(),
|
||||
string({
|
||||
include: "**/*.css",
|
||||
}),
|
||||
builtins(),
|
||||
nodeGlobals({
|
||||
dirname: false,
|
||||
|
@ -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")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue