webpack-entry-plus | Generate dynamic webpack bundle output names | Plugin library
kandi X-RAY | webpack-entry-plus Summary
kandi X-RAY | webpack-entry-plus Summary
Generate dynamic webpack bundle output names from known or unknown entry files
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of webpack-entry-plus
webpack-entry-plus Key Features
webpack-entry-plus Examples and Code Snippets
Community Discussions
Trending Discussions on webpack-entry-plus
QUESTION
Hi I'm trying to create a Webpack configuration that generates files for each folder within this project. Making a webpack.config for each folder is not an option.
I have an index.html, JS and SASS all processed. The next step is the images, which I'm struggling with.
What currently happens is:
cd /MyProject/ && npm run build
Inside of this folder, there are 'modules', each module is a folder.
src:
/MyProject/MyModule/src/js/app.js
/MyProject/MyModule/src/scss/app.scss
/MyProject/MyModule/src/index.html
/MyProject/MyModule/src/img/example1.jpg
dist:
MyProject/MyModule/dist/(app.css|app.js|index.html|img/example1.jpg)
My Problem
When saving the images, in this current way below,
name: '[path]../../dist/img/[name].[ext]'
My HTML output is this:
I do understand why this is happening, but I don't know of any better way.
If I remove [path]
it of course saves inside of MyProject instead of MyModule, which is what I don't want.
webpack.config.js
...ANSWER
Answered 2018-Oct-26 at 20:15I will work for a better RegExp, but I used the following solution
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install webpack-entry-plus
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page