I
I
ilya4042017-10-17 21:11:06
webpack
ilya404, 2017-10-17 21:11:06

Where does 'extract-text-webpack-plugin' save files?

Guys
here is the code:

var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
    entry: './app.js',
    output: {
        filename: "bundle.js"
    },
    module: {
        loaders: [
            {
                test: /\.js$/,
                exclude: /node_modules/,
                loader: 'babel-loader'
            },
            {
                test: /\.styl$/,
                loader: ExtractTextPlugin.extract({
                    fallback: "style-loader",
                    use: ["css-loader", "stylus-loader"],
                    publicPath: '/css'
                })
            }
        ]
    },
    plugins: [
        new ExtractTextPlugin('bundle.css')
    ]
};

Where does webpack save the bundle.css file? Does it save at all? Styles come to the page, but physically the file is not in the directory.
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladislav Khelsov, 2019-06-27
@helsov

Forgot to specify path:

output: {
        path: path.resolve(__dirname, 'dist'),
        filename: 'bundle.js'
    }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question