Add preview#3
Conversation
| ], | ||
| plugins: [ | ||
| new CopyWebpackPlugin([ | ||
| { from: "src/**/*.js" }, |
There was a problem hiding this comment.
we dont need to copy .js files, they com from webpack
| libraryTarget: "commonjs" | ||
| }, | ||
| resolve: { | ||
| extensions: [ ".ts", ".js" ] |
There was a problem hiding this comment.
Can you live without ".js" ?
| const widgetConfig = { | ||
| entry: "./src/PullToRefresh/widget/PullToRefresh.ts", | ||
| output: { | ||
| path: path.resolve(__dirname, "dist/tmp"), |
There was a problem hiding this comment.
Target libraryTarget: "umd" should be amd else the minifycation will break the client.
| const widgetConfig = { | ||
| entry: "./src/PullToRefresh/widget/PullToRefresh.ts", | ||
| output: { | ||
| path: path.resolve(__dirname, "dist/tmp"), |
There was a problem hiding this comment.
in webpack 2 you don't need to resolve the extension ".json"
and probably also no js
There was a problem hiding this comment.
Thanks for sharing the knowledge , i have made the correction
| "dojo/dom-style" ], | ||
| "react", | ||
| "react-dom", | ||
| "mxui/widget/_WidgetBase", |
There was a problem hiding this comment.
mx and dojo externals could be added with regex
externals: [ "react", "react-dom", /^mxui\/|^mendix\/|^dojo\/|^dijit\// ],
|
|
||
| ## Dependencies | ||
| Mendix version 6.10 or up | ||
| Mendix version 7.3 or up |
There was a problem hiding this comment.
Widget should stay compatible with 6.10
Though the preview will only for the web modeler
|
Please update the files to avoid conflicts |
-web modeler preview