Plugins
Herramientas externas perfectamente sincronizadas
The additional configuration to associate with EStack must exist in the package.json, you can selectively associate configurations according to your objectives.
Rollup
Stack uses Rollup for processing files with the extension .js, .jsx, .ts, .tsx
.
Adding plugins for rollup
EStack allows to inject plugins into Rollup, using the --js <pkg_property>
flag, example:
{
"scripts": {
"dev": "estack dev src/**/*.html --js estack.dev.js",
"build": "estack build src/**/*.html public --js estack.build.js"
},
"estack": {
"dev": {
"js": {
"plugins": {
"@rollup/plugin-typescript": {
"tsconfig": "tsconfig.json"
}
}
}
},
"build": {
"js": {
"plugins": {
"@rollup/plugin-typescript": {
"tsconfig": "tsconfig.json"
},
"rollup-plugin-terser": {}
}
}
}
}
}
Postcss
EStack uses Postcss for processing files with the extension .css
, by default EStack for postcss:
- Plugin @uppercod/postcss-import.
Adding plugins for postcss
Estack allows you to inject plugins into Postcss, using the --css <pkg_property>
flag, example:
{
"scripts": {
"dev": "estack dev src/**/*.html --css estack.dev.css",
"build": "estack build src/**/*.html public --css estack.build.css"
},
"estack": {
"dev": {
"css": {
"plugins": {
"postcss-preset-env": {}
}
}
},
"build": {
"css": {
"plugins": {
"postcss-preset-env": {},
"cssnano": {}
}
}
}
}
}