Comments (9)
Use output.path
in addition to output.filename
.
from extract-text-webpack-plugin.
I'm hoping for multiple output paths (one for each entry bundle). So the output path is generic and then the filename for my javascript is [name]/[name].js
. Similarly I'm trying to do new extractTextPlugin('[name]/css/styles.css')
but the assets such as fonts associated with the css file are not put in the same path.
from extract-text-webpack-plugin.
Hey,
Resurrecting an old ticket but I too am essentially wanting to have multiple output folders for my entry bundles. An example:
Bundle A and Bundle B get output into ./assets/js/
Bundle C gets output into ./another-folder/js
from extract-text-webpack-plugin.
Uh, yup. Just ran into the same dilemma. Bump 😃
from extract-text-webpack-plugin.
Just an update to say that I've currently got around this issue by using webpack-stream
, and not specifying any output options in the webpack configuration. I then use gulp-rename to update the paths of the streams based upon a manifest I keep that coincides with my webpack entry bundles, and that does the job. Slightly convoluted but it's a viable workaround!
from extract-text-webpack-plugin.
Same here. I have a webpack configuration that needs to output to 2 different folders. output.path
is the base and output.filename
contains [name]/
.
I don't know what the implementation would involve, but it seems clear to me the right answer is either reuse output.filename
, or allow us to specify a filename
option that works the same way.
from extract-text-webpack-plugin.
it's a little hackish, but the most simple solution for me was adding some shell commands to my npm scripts.
eg
"scripts": {
"build": "webpack -p --colors --optimize-dedupe && cp ./path/to/index.html ./dist/index.html"
}
from extract-text-webpack-plugin.
I am working on a small project and already stumbled with this limitation. In my case, I want some code in the dist/
folder and some other code in the web/
folder.
As a suggestion, this could be a way to specify it:
entry: {
example: './src/examples/main.ts',
'my-lib': './src/my-lib.ts'
},
output: {
path: path.resolve(__dirname),
filenames: {
example: 'web/example.js',
'my-lib': 'dist/my-lib.js'
}
}
@brandonmp solution has a major drawback: it is not portable, because Windows won't recognize the "mv" command.
from extract-text-webpack-plugin.
+1
from extract-text-webpack-plugin.
Related Issues (20)
- Not working with webpack 4 HOT 4
- How to get that generated css in webpack plugin even in dev mode where style-loader is being used? HOT 1
- remove neo-async HOT 1
- webpack 3.8.1 css loader not working HOT 1
- Newbie question. Sorry for my ignorance. How do I uninstall? HOT 2
- Remove "/" from href="" on generated HTML HOT 1
- Sourcemaps are not linked HOT 1
- How to use this plugin and minify SCSS to CSS? HOT 7
- CSS file not generated HOT 3
- "extract-text-webpack-plugin" loader is used without the corresponding plugin HOT 3
- lost -webkit-box-orient HOT 2
- no vendor.css
- How to extract critical and uncritical css to different separate css file? HOT 1
- Stats/debug log could be improved HOT 1
- CSS is extracted from Dynamically loaded chunks, but not injected in page by the fallback loader HOT 1
- Removes Required CSS HOT 1
- Chrome Refused to apply style HOT 1
- Not able to run karma getting errors related to ```extract-text-webpack-plugin``` HOT 1
- 4.0.0-beta for a year+ - is this a dead project? HOT 2
- I've also got this issue: Module parse failed: Unexpected character '#' (17:0); HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from extract-text-webpack-plugin.