main
HerrHase 2 months ago
parent 7b837b90f1
commit df87d48069

@ -11,12 +11,26 @@ module.exports = tinyComponentsWebpack({
}) })
``` ```
## Options
### destination
``` ```
const tinyComponentsWebpack = require('@tiny-components/webpack') module.exports = tinyComponentsWebpack({
<files>
}, {
destination: path.resolve(process.cwd(), '../../')
})
```
### svg
Path to svgs to bundle them with "svg-spritemap-webpack-plugin" to get a
single file,
```
module.exports = tinyComponentsWebpack({ module.exports = tinyComponentsWebpack({
critical: [ './resources/js/critical.js' ], <files>
styles: [ './resources/scss/styles.scss' ],
}, { }, {
svg: { svg: {
src: [ src: [
@ -26,12 +40,67 @@ module.exports = tinyComponentsWebpack({
}) })
``` ```
### context
Working Directory for Webpack,
```
module.exports = tinyComponentsWebpack({
<files>
}, {
context: path.resolve(process.cwd(), '../')
})
```
### publicPath
Name of the Public Path, default is set to '/',
```
module.exports = tinyComponentsWebpack({
<files>
}, {
publicPath: '/public/'
})
```
### purge:src
Directory for find css-classes in files,
```
module.exports = tinyComponentsWebpack({
<files>
}, {
purge: {
src: path.join(__dirname, 'resources/js')
}
})
```
### purge:src
Lists of Regex to ignore css-classes,
```
module.exports = tinyComponentsWebpack({
<files>
}, {
purge: {
safelist: {
deep: [ /tiny-datepicker/, /toast/ ]
}
}
})
```
## Plugin: Riot.js ## Plugin: Riot.js
For using Riot.js, install compiler and webpack-loader For using Riot.js, install compiler and webpack-loader
``` ```
npm install @riotjs/compiler @riotjs/webpack-loader --save-dev npm install @riotjs/compiler @riotjs/webpack-loader --save-dev
bun add @riotjs/compiler @riotjs/webpack-loader --dev
``` ```
And adding a rule for Riot.js, And adding a rule for Riot.js,

Loading…
Cancel
Save