@tiny-components/webpack (0.4.0)
Published 4 months ago by HerrHase
Installation
@tiny-components:registry=https://git.node001.net/api/packages/tiny-components/npm/
npm install @tiny-components/webpack@0.4.0
"@tiny-components/webpack": "0.4.0"
About this package
Webpack
Small Wrapper Function for using Webpack. These Function is only Build to using,
const tinyComponentsWebpack = require('@tiny-components/webpack')
module.exports = tinyComponentsWebpack({
critical: [ './resources/js/index.js' ],
styles: [ './resources/scss/styles.scss' ],
})
const tinyComponentsWebpack = require('@tiny-components/webpack')
module.exports = tinyComponentsWebpack({
critical: [ './resources/js/critical.js' ],
styles: [ './resources/scss/styles.scss' ],
}, {
svg: {
src: [
'./resources/icons/*.svg'
]
}
})
Plugin: Riot.js
For using Riot.js, install compiler and webpack-loader
npm install @riotjs/compiler @riotjs/webpack-loader --save-dev
And adding a rule for Riot.js,
const tinyComponentsWebpack = require('@tiny-components/webpack')
const riotPlugin = require('@tiny-components/webpack/rules/riot')
module.exports = tinyComponentsWebpack({
critical: [ './resources/js/critical.js' ],
styles: [ './resources/scss/styles.scss' ],
}, {
rules: [ riotRules ]
})
Dependencies
Dependencies
ID | Version |
---|---|
css-loader | ^6.10.0 |
mini-css-extract-plugin | ^2.8.1 |
purgecss-webpack-plugin | ^5.0.0 |
sass | ^1.71.1 |
sass-loader | ^14.1.1 |
svg-spritemap-webpack-plugin | ^4.5.0 |
webpack | ^5.90.3 |
webpack-cli | ^5.1.4 |
webpack-remove-empty-scripts | ^1.0.4 |