bugfix for directory and resolve path, url for assets is to false

main v0.3.0
HerrHase 1 month ago
parent 7cc43bea82
commit 0da9f89c7a

@ -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]",
}
}]
},

@ -1,6 +1,6 @@
{
"name": "@tiny-components/webpack",
"version": "0.2.0",
"version": "0.3.0",
"description": "Webpack Wrapper",
"repository": {
"type": "git",

Loading…
Cancel
Save