chore: reformat with 2 spaces
This commit is contained in:
parent
d659e4bed9
commit
7670d7f808
1577 changed files with 70010 additions and 70042 deletions
|
@ -10,19 +10,19 @@ import { copy } from "@guanghechen/rollup-plugin-copy";
|
|||
import { distDirectory, name, sourceDirectory } from "./tools/const.js";
|
||||
|
||||
const staticFiles = [
|
||||
".reuse",
|
||||
"assets",
|
||||
"ATTRIBUTION.md",
|
||||
"fonts",
|
||||
"lang",
|
||||
"LICENSE.md",
|
||||
"LICENSES",
|
||||
"README.md",
|
||||
"system.json.license",
|
||||
"system.json",
|
||||
"template.json.license",
|
||||
"template.json",
|
||||
"templates",
|
||||
".reuse",
|
||||
"assets",
|
||||
"ATTRIBUTION.md",
|
||||
"fonts",
|
||||
"lang",
|
||||
"LICENSE.md",
|
||||
"LICENSES",
|
||||
"README.md",
|
||||
"system.json.license",
|
||||
"system.json",
|
||||
"template.json.license",
|
||||
"template.json",
|
||||
"templates",
|
||||
];
|
||||
const isProduction = process.env.NODE_ENV === "production";
|
||||
|
||||
|
@ -30,34 +30,34 @@ const isProduction = process.env.NODE_ENV === "production";
|
|||
* @type {import('rollup').RollupOptions}
|
||||
*/
|
||||
const config = {
|
||||
input: { [name]: `${sourceDirectory}/${name}.ts` },
|
||||
output: {
|
||||
dir: distDirectory,
|
||||
format: "es",
|
||||
sourcemap: true,
|
||||
assetFileNames: "[name].[ext]",
|
||||
},
|
||||
plugins: [
|
||||
swc({
|
||||
jsc: {
|
||||
minify: isProduction && {
|
||||
sourceMap: true,
|
||||
mangle: {
|
||||
keepClassNames: true,
|
||||
keepFnNames: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
sourceMaps: true,
|
||||
}),
|
||||
styles({
|
||||
mode: ["extract", `css/${name}.css`],
|
||||
url: false,
|
||||
sourceMap: true,
|
||||
minimize: isProduction,
|
||||
}),
|
||||
copy({ targets: [{ src: staticFiles, dest: distDirectory }] }),
|
||||
],
|
||||
input: { [name]: `${sourceDirectory}/${name}.ts` },
|
||||
output: {
|
||||
dir: distDirectory,
|
||||
format: "es",
|
||||
sourcemap: true,
|
||||
assetFileNames: "[name].[ext]",
|
||||
},
|
||||
plugins: [
|
||||
swc({
|
||||
jsc: {
|
||||
minify: isProduction && {
|
||||
sourceMap: true,
|
||||
mangle: {
|
||||
keepClassNames: true,
|
||||
keepFnNames: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
sourceMaps: true,
|
||||
}),
|
||||
styles({
|
||||
mode: ["extract", `css/${name}.css`],
|
||||
url: false,
|
||||
sourceMap: true,
|
||||
minimize: isProduction,
|
||||
}),
|
||||
copy({ targets: [{ src: staticFiles, dest: distDirectory }] }),
|
||||
],
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue