-
Notifications
You must be signed in to change notification settings - Fork 27
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
plugin doesn't output media related files based on query. Is it because of loaders? #88
Comments
Hi @ctsenthil thanks for using my plugin! However "having issue" doesn't help me much to reproduce your problem. |
@SassNinja loaders are not getting applied to the media chunks. filename are '[name].[contenthash].css', format |
Are you talking about your chunks which contains both, CSS inside of In case of the latter there's an open bug issue for it #17 If my plugin doesn't do anything it would be helpful to see a sass code example. |
@media rules what ever i added in queries gets removed from main.df26c7424f7f201fa000.css. but it didn't generate individual file based on the query . queries: { i expect to see main-mobile.df26c7424f7f201fa000.css,main-tablet.df26c7424f7f201fa000.css,main-desktop.df26c7424f7f201fa000.css |
That's weird... if it removes the code from your original sass file, then it should definitely appear somewhere because it doesn't remove any code without being able to save it at the end. My assumption is that either some plugin in your webpack process removes those files or another loader/plugin interferes with it and overwrites the extracted code. In any case it's hard to debug without having a sample to easily reproduce the problem. So I can only suggest that you either try to remove one loader/plugin after the other to find out if there's one interfering with my plugin. Or another possiblity is that you create a simple webpack setup (e.g. using codesandbox) with example sass code which shows the problem. |
Indeed, you have such a problem. When inside the media request there is for example "background: url(../img.jpg )", then it is not processed... |
First of all great plugin which i was looking for to reduce the file size and improve the performance of the website.
I am having issue in generating query related files. Can you help me out what is wrong in the below code'
plugins: [
new DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production'),
'ENV_PROXY': JSON.stringify(env.proxy),
}),
new CopyWebpackPlugin({
patterns: [
{ from: resolve(projectRoot, 'assets//*'), to: resolve(projectRoot, 'dist/web-react/assets') },
{ from: resolve(projectRoot, 'locales//*'), to: resolve(projectRoot, 'dist/web-react/locales') }
]
}),
}),
//new MobileFirstMediaQueriesSplitterPlugin([600, 1024]),
new WatchIgnorePlugin({
paths: [
'cypress/**/*'
]}),
],
The text was updated successfully, but these errors were encountered: