You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
1.9 KiB
68 lines
1.9 KiB
2 years ago
|
const mix = require('laravel-mix')
|
||
|
|
||
|
const SvgSpritemapPlugin = require('svg-spritemap-webpack-plugin')
|
||
|
|
||
|
/*
|
||
|
|--------------------------------------------------------------------------
|
||
|
| Mix Asset Management
|
||
|
|--------------------------------------------------------------------------
|
||
|
|
|
||
|
| Mix provides a clean, fluent API for defining some Webpack build steps
|
||
|
| for your Laravel application. By default, we are compiling the Sass
|
||
|
| file for your application, as well as bundling up your JS files.
|
||
|
|
|
||
|
*/
|
||
|
|
||
|
mix.webpackConfig({
|
||
|
plugins: [
|
||
|
new SvgSpritemapPlugin([
|
||
|
'node_modules/@tiny-components/plain-ui/src/icons/mono-icons/svg/*.svg'
|
||
|
], {
|
||
|
output: {
|
||
|
filename: 'symbol-defs.svg',
|
||
|
chunk: {
|
||
|
keep: true
|
||
|
},
|
||
|
svgo: {
|
||
|
plugins: [{
|
||
|
name: 'convertStyleToAttrs',
|
||
|
active: true
|
||
|
},{
|
||
|
name: 'removeStyleElement',
|
||
|
active: true
|
||
|
}, {
|
||
|
name: 'removeAttrs',
|
||
|
params: {
|
||
|
attrs: 'fill'
|
||
|
}
|
||
|
}]
|
||
|
}
|
||
|
},
|
||
|
sprite: {
|
||
|
prefix: 'icon-'
|
||
|
}
|
||
|
})
|
||
|
],
|
||
|
module: {
|
||
|
rules: [{
|
||
|
test: /\.riot$/,
|
||
|
exclude: '/node_modules/',
|
||
|
use: [{
|
||
|
loader: '@riotjs/webpack-loader',
|
||
|
options: {
|
||
|
hot: false
|
||
|
}
|
||
|
}]
|
||
|
}]
|
||
|
}
|
||
|
}).options({
|
||
|
processCssUrls: false,
|
||
|
})
|
||
|
|
||
|
mix
|
||
|
.setPublicPath('./build')
|
||
|
.js('src/js/app.js', 'js')
|
||
|
.copy('resources/js/neutralino.js', 'build/js')
|
||
|
.sass('src/scss/styles.scss', 'css')
|
||
|
.copyDirectory('node_modules/@tiny-components/plain-ui/src/fonts/**', 'build/css')
|