-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generated file missing in the manifest #14
Comments
up |
Adding this to the manifest would be great. |
up |
2 similar comments
up |
up |
Hi, can you show me your webpack configuration so I can test it? Thanks |
sure. import path from 'path'
import webpack from 'webpack'
import ManifestPlugin from 'webpack-manifest-plugin'
import UglifyJSPlugin from 'uglifyjs-webpack-plugin'
import CleanWebpackPlugin from 'clean-webpack-plugin'
import ExtractTextPlugin from 'extract-text-webpack-plugin'
import WebpackRTLPlugin from 'webpack-rtl-plugin'
import CopyWebpackPlugin from 'copy-webpack-plugin'
const dev = process.env.NODE_ENV === 'dev'
let cssLoaders = [{
loader: 'css-loader',
options: {
importLoaders: 1,
minimize: !dev
}
}]
let config = {
entry: {
app: ['./assets/css/app/app.scss', './assets/js/app/app.js']
},
output: {
path: path.resolve(__dirname, 'web/assets'),
filename: dev ? 'js/[name].js' : 'js/[name].[chunkhash:8].js',
publicPath: (dev ? 'https://127.0.0.1:8123' : '') + '/assets/'
},
devtool: dev ? 'cheap-module-eval-source-map' : false,
devServer: {
contentBase: path.resolve(__dirname, 'web'),
host: '127.0.0.1',
port: 8123,
overlay: true,
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization'
},
stats: {
colors: true
}
},
module: {
rules: [
{
test: /\.css$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: cssLoaders
})
},
{
test: /\.scss$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [...cssLoaders, 'sass-loader']
})
},
{
test: /\.(png|jpg|jpeg|gif)$/,
use: [
{
loader: 'file-loader',
options: {
name: 'images/[name].[hash:8].[ext]'
}
}
]
},
{
test: /\.(eot|svg|ttf|woff|woff2)$/,
use: [
{
loader: 'file-loader',
options: {
name: 'fonts/[name].[hash:8].[ext]'
}
}
]
}
]
},
plugins: [
new ExtractTextPlugin({
filename: dev ? 'css/[name].css' : 'css/[name].[contenthash:8].css',
disable: dev
})
]
};
if (!dev) {
config.plugins.push(new CleanWebpackPlugin([path.resolve(__dirname, 'web/assets/')]));
config.plugins.push(new UglifyJSPlugin());
config.plugins.push(new ManifestPlugin());
config.plugins.push(new WebpackRTLPlugin());
}
export default config; |
An immediate solution would be to add the ManifestPlugin after the WebpackRTLPlugin.
` |
Any update on this? It will be a really great feature if it can be added in manifest. Thanks. |
atimmer
added a commit
to atimmer/webpack-helpers
that referenced
this issue
Apr 6, 2021
When using the WebpackRTLPlugin the manifest doesn't produce entries for both the original and the RTL file. This results in the wrong file being loaded. This is caused by the fact that both files are in the same chunk. There is an issue tracking this on the WebpackRTLPlugin: romainberger/webpack-rtl-plugin#14 This commit includes a workaround. By providing a `map` function to the manifest plugin we can change the name when we're dealing with an RTL file. That results in two entries in the eventual manifest.
atimmer
added a commit
to atimmer/webpack-helpers
that referenced
this issue
Apr 6, 2021
When using the WebpackRTLPlugin the manifest doesn't produce entries for both the original and the RTL file. This results in the wrong file being loaded. This is caused by the fact that both files are in the same chunk. There is an issue tracking this on the WebpackRTLPlugin: romainberger/webpack-rtl-plugin#14 This commit includes a workaround. By providing a `map` function to the manifest plugin we can change the name when we're dealing with an RTL file. That results in two entries in the eventual manifest.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm using this plugin with webpack-manifest-plugin, but the generated rtl files are missing in the manifest.json file, is there any way to add them automatically ? also Is there a way to use rtl-css-loader with sass files, I tried to to that but it fails.
The text was updated successfully, but these errors were encountered: