webpack-contrib / file-loader

File Loader
MIT License
1.86k stars 257 forks source link

webpack doesn't generate output folder(dist in my case) after upgrading to file-loader@3.0.0 #311

Closed pzmosquito closed 5 years ago

pzmosquito commented 5 years ago

Expected Behavior

webpack should generate output folder(dist in my case) normally

Actual Behavior

webpack did not generate output folder(dist in my case)

Code

export default {
    mode: "production",
    resolve: {
        extensions: ["*", ".js", ".jsx", ".json"]
    }
    module: {
        rules: [
            {
                test: /\.jsx?$/,
                include: path.resolve(__dirname, "src"),
                use: ["babel-loader"]
            },
            {
                test: /\.(jpe?g|png|gif|ico)$/i,
                use: ["file-loader"]
            }
        ]
    }
};

How Do We Reproduce?

I use babel-node to load the config: babel-node build.js

below are build.js

import webpack from "webpack";
import config from "webpack.config";

webpack(config).run();
alexander-akait commented 5 years ago

@pzmosquito no changes with emit, please provide minimum reproducible test repo

alexander-akait commented 5 years ago

@pzmosquito tests work good https://github.com/webpack-contrib/file-loader/pull/312, looks something wrong with your configuration

alexander-akait commented 5 years ago

Please try https://github.com/webpack-contrib/file-loader/releases/tag/v3.0.1, feel free to feedback

alexander-akait commented 5 years ago

Find a problem

pzmosquito commented 5 years ago

@evilebottnawi I was trying to come up with minimum code that is similar to my set up, but update to 3.0.1 worked for me. Did you just find another problem for 3.0.1?

alexander-akait commented 5 years ago

@pzmosquito yep, not related to you, very rare use case, good news what works as expected