|
|
|
@ -11,7 +11,7 @@ module.exports = function tinyComponentsWebpack(files, options = {}) {
|
|
|
|
|
|
|
|
|
|
// merge options with defaults
|
|
|
|
|
const defaults = Object.assign({
|
|
|
|
|
destination: path.resolve(__dirname, 'public'),
|
|
|
|
|
destination: path.resolve(process.cwd(), 'public'),
|
|
|
|
|
purge: {
|
|
|
|
|
src: path.join(__dirname, 'js')
|
|
|
|
|
}
|
|
|
|
@ -24,6 +24,10 @@ module.exports = function tinyComponentsWebpack(files, options = {}) {
|
|
|
|
|
filename: 'js/[name].js',
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
resolve: {
|
|
|
|
|
modules: ['node_modules'],
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
optimization: {
|
|
|
|
|
removeEmptyChunks: true,
|
|
|
|
|
minimize: true,
|
|
|
|
@ -41,12 +45,21 @@ module.exports = function tinyComponentsWebpack(files, options = {}) {
|
|
|
|
|
|
|
|
|
|
module: {
|
|
|
|
|
rules: [{
|
|
|
|
|
test: /\.scss$/,
|
|
|
|
|
test: /\.(css|scss)$/,
|
|
|
|
|
use: [
|
|
|
|
|
MiniCssExtractPlugin.loader,
|
|
|
|
|
'css-loader',
|
|
|
|
|
{
|
|
|
|
|
loader: 'css-loader',
|
|
|
|
|
options: { url: false }
|
|
|
|
|
},
|
|
|
|
|
'sass-loader'
|
|
|
|
|
]
|
|
|
|
|
},{
|
|
|
|
|
test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/,
|
|
|
|
|
type: 'asset/resource',
|
|
|
|
|
generator: {
|
|
|
|
|
filename: "fonts/[name].[ext]",
|
|
|
|
|
}
|
|
|
|
|
}]
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|