-
Notifications
You must be signed in to change notification settings - Fork 16
Description
So the way my app is structured is any component that needs images has a nested /images folder inside each component. I am using the babel-plugin-file-loader to extract the images and move them into the /public/images at the root of the project.
This is my .babelrc config:
"presets": [
"env",
"react"
],
"plugins": [
[ "babel-plugin-styled-components",
{
"ssr": true,
"displayName": true
}
],
"transform-class-properties",
"transform-decorators",
"transform-react-constant-elements",
"transform-react-inline-elements",
[ "babel-plugin-webpack-alias", { "config": "./config/build/webpack.config.js" } ],
[
"file-loader",
{
"name": "[name].[ext]",
"extensions": ["png", "jpg", "jpeg", "gif", "svg"],
"publicPath": "/images",
"outputPath": "/public/images",
"context": "/"
}
]
]
}
My issue is that every time the app builds it creates a /public/images/** directory inside any components that it is pulling the images from. All I want it to do is create the /public/images/** at root not inside each components folder that has an images folder
I have tried messing with the context, publicPath, and outputPath and I can't get it to stop making a new /public folder inside my component folders. I am not sure is this a bug or do I have something configured incorrectly??