File tree 1 file changed +32
-0
lines changed
1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -216,6 +216,38 @@ Don't forget to load the `schemaForm` module or nothing will happen.
216
216
angular .module (' myModule' , [' schemaForm' ]);
217
217
```
218
218
219
+ ### Webpack loading
220
+ In order to import angular-schema-form into your application you will need to
221
+ import it as follows:
222
+
223
+ ` import schemaForm from 'angular-schema-form/dist/schema-form.js'; `
224
+
225
+ It is important to override the ` main ` in the ` package.json ` as you will need to
226
+ utilize the ` import-loader ` in webpack to import angular-schema-form
227
+ dependencies like so.
228
+
229
+ ``` js
230
+ {
231
+ test: require .resolve (' angular-schema-form/dist/schema-form.js' ),
232
+ use: ' imports-loader?tv4,ngSanitize=angular-sanitize,objectPath=objectpath'
233
+ }
234
+ ```
235
+
236
+ If you use the default minified version it will fail.
237
+
238
+ If you desire to utilize the embedded ` bootstrap-decorator ` in this repository
239
+ and not the update split out repository, then you will need to update your
240
+ webpack configuration as follows to resolve ` schemaForm ` to the proper path.
241
+
242
+ ` import angularSchemaFormBootstrap from 'angular-schema-form/dist/bootstrap-decorator.js'; `
243
+
244
+ ``` js
245
+ resolve: {
246
+ alias: {
247
+ schemaForm: ' angular-schema-form/dist/schema-form.js'
248
+ }
249
+
250
+ ` ` `
219
251
Add-ons
220
252
------
221
253
There are several add-ons available, for a full list see the [web page](http://textalk.github.io/angular-schema-form/#third-party-addons).
You can’t perform that action at this time.
0 commit comments