Comments (7)
The webpack-dev-server works in memory only. There is no need to write something to disk when it's only needed temporarily while you're developing.
from webpack-dev-server.
ok, thanks.
from webpack-dev-server.
But how can i define a subfolder in the configuration of the devserver to run the following default index.html:
<html>
<body></body>
<script src="build/build.js"></script>
<link rel="stylesheet" media="all" type="text/css" href="build/styles.css">
</html>
?
Currently it only works without a subfolder. I don't want to change my index.html only for the devserver.
from webpack-dev-server.
Try to add this to your configuration:
devServer: {
publicPath: "/build"
}
from webpack-dev-server.
I think I'm having a similar problem, which I noted in #485. I think one of the big problems here is that the documentation on publicPath is incredibly vague, both in the webpack docs and the webpack-dev-server docs. I'm not sure what exactly I'm supplying a path to, and I've tried many strings for the path, but none of the results in HMR working if contentBase is more than one level below the root dir.
from webpack-dev-server.
publicPath
will be pre-pended to every request when requesting chunks, hot module updates, etc. It should reflect the pathname
as seen by the browser (like location.pathname
).
from webpack-dev-server.
Closing because of staleness, and all questions are answered. Feel free to comment if you think otherwise.
from webpack-dev-server.
Related Issues (20)
- Why writeToDisk cannot work in webpack-dev-server 3.1.9 HOT 1
- Overlay.runtimeErrors doesn't work HOT 1
- Deep unmet peerDependency warnings from `memfs` HOT 4
- 5.0 dev server requires 'unsafe-eval' script-src in CSP HOT 3
- Types in lib/Server referring to non-existing Request_1 and Response_1 interfaces HOT 1
- Webpack dev server HRM not update vuejs file after compile error HOT 3
- After the latest webpack-dev-server upgrade, not able to start the server HOT 3
- devServer.static can't be an array. HOT 2
- devServer proxy config outputs deprecation warning in http-proxy-middleware
- Error while running example general/config-array HOT 1
- Invalid options object: options has an unknown property 'running' (webpack-cli v4.10.0) HOT 7
- Consider editing repository setings to remove "Packages" section HOT 1
- Configuring dist/main.js to be included when dev server starts HOT 3
- Types of version 5.0.0 still allow `proxy` to be an object
- The server log is being spammed HOT 2
- K
- The memory usage during project runtime after upgrade is very high HOT 2
- Additional Assets emitted via `processAssets` hook do not invalidate the build HOT 4
- Web Dev Server Inaccessible from Local Network Devices Despite Correct Configuration HOT 2
- Add visual progress indicator HOT 3
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 webpack-dev-server.