Comments (1)
The module
build should automatically work with SSR, because it relies on the user for compilation and they can specify target: 'node'
in their configuration.
The CJS and UMD builds are a different story though. Personally, I would just tell SSR users not to use them. However, if you wanted to assume an SSR context, then I believe adding config.target('node')
to the chainWebpack
function in vue.config.js
should work. If you want to separate versions for SSR and the browser, then you'd probably want to use something like config.target(process.env.WEBPACK_TARGET)
instead and then update build-lib.js
create SSR builds.
Does that make sense?
from hello-vue-components.
Related Issues (16)
- Passing props other than string HOT 1
- Typescript & Vue property decorator support HOT 1
- Lint "meta" custom block HOT 1
- Script inside SFC results in 'component is not defined' error for UMD. HOT 2
- Can't find components when building
- Library versioning
- [feature-request] Example setup for Vuepress documentation HOT 1
- Library exporting globally as 'index'
- extractCss false not working with SSR // server side rendered code not matching client side
- "yarn dev" fails because it wants components to be installed as dependencies HOT 1
- Add a HOT 1
- Add a "docs
- [feature] Add a "docs" section within the SFC files? HOT 2
- [feature] "Moderate" build process? HOT 1
- Add an example with vue-router HOT 10
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 hello-vue-components.