build wpf bundle
hi,
when I use
react-native bundle --platform wpf --entry-file index.wpf.js
--bundle-output wpf\tte\ReactAssets\index.wpf.bundle
--assets-dest wpf\tte\ReactAssets
to build index.wpf.bundle, and I got Unrecognized platform: wpf message
Hi @scott108, did you run npm i rnpm-plugin-wpf or yarn add rnpm-plugin-wpf and react-native wpf before trying to run the bundle command?
Hi @sayar , I just run npm i rnpm-plugin-windows and react-native wpf, is there anything different??
Yep, you gotta run npm i rnpm-plugin-wpf (note the wpf instead of windows) to be able to add wpf platform support. Let me know if that fixes your problem so I can close this issue.
If i only run npm i rnpm-plugin-wpf, and I got Unrecognized command 'wpf' message after react-native wpf(reference #1177)

@scott108, I wasn't able to reproduce this error. Can you please share what versions of react-native you are using?
Hi @sayar, here is my package.json
{
"name": "test",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.0.0-alpha.12",
"react-native": "0.47.1"
},
"devDependencies": {
"babel-jest": "20.0.3",
"babel-preset-react-native": "2.1.0",
"jest": "20.0.4",
"react-test-renderer": "16.0.0-alpha.12"
},
"jest": {
"preset": "react-native"
}
}
You are missing react-native-windows.
npm install --save-dev rnpm-plungin-wpf
npm install --save-dev react-native-windows
react-native wpf
Can you help me about this issue
@sayar can you help me?
In order to create bundle for WPF platform use 'windows' option instead of 'wpf':
react-native bundle --platform **windows** --entry-file **index.js** --bundle-output wpf\samplewpfapp\ReactAssets\index.wpf.bundle --assets-dest wpf\samplewpfapp\ReactAssets
Alter refer:
- https://github.com/Microsoft/react-native-windows/issues/1801
- https://github.com/Microsoft/react-native-windows/issues/1539
Looks like @ncomo11 might have the correct solution here. Please advise if this needs to be re-opened.