Closed KerberosMorphy closed 5 months ago
Hi there,
I'm trying to use this plugin with webpack to generate a mix-manifest.json file but I don't understand why the filename in the key doesn't match the real filename.
mix-manifest.json
My webpack.config.js :
webpack.config.js
module.exports = { entry: [ './Scripts/app.js', ], output: { path: path.resolve(__dirname, 'Public'), filename: 'js/app.js?id=[chunkhash]', }, resolve: { fallback: { "stream": require.resolve("stream-browserify") } }, devtool: process.env.NODE_ENV !== 'production' ? 'eval-source-map' : false, module: { rules: [ { test: /\.s[ac]ss$/i, use: [ { loader: MiniCssExtractPlugin.loader, options: {} }, { loader: "css-loader", options: { url: false } }, { loader: 'sass-loader', options: { webpackImporter: false, sassOptions: { outputStyle: "compressed", }, }, } ], }, ], }, optimization: { minimize: true, minimizer: [new TerserPlugin()], }, plugins: [ new MiniCssExtractPlugin({ filename: 'css/app.css?id=[chunkhash]', }), new WebpackLaravelMixManifest() ], };
The generated file:
Public/ ├── css/ │ └── app.css ├── js/ │ └── app.js └── mix-manifest.json
The mix-manifest.json generated:
{ "/css/main.css": "/css/app.css?id=2957c3d783357f8cddbe", "/js/main.js": "/js/app.js?id=2957c3d783357f8cddbe" }
What it should be:
{ "/css/app.css": "/css/app.css?id=2957c3d783357f8cddbe", "/js/app.js": "/js/app.js?id=2957c3d783357f8cddbe" }
Hi there,
I'm trying to use this plugin with webpack to generate a
mix-manifest.json
file but I don't understand why the filename in the key doesn't match the real filename.My
webpack.config.js
:The generated file:
The
mix-manifest.json
generated:What it should be: