-
I'm trying to use a local lib, that I install with
In the browser when running the Spotfire Mod then I get:
I tried to include I tried to export my lib as The webpack from {
filename: "index.js",
library: "mylib",
libraryTarget: "umd", // or "commonjs2"
} Any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
It's not easy to help without further information.
I can't think of any of our existing examples that use webpack and gulp together. A mod is in essence only a website with an index.html, its referenced resources, and a manifest. There is nothing special regarding the bundling of resources that I can think of. |
Beta Was this translation helpful? Give feedback.
-
If I remember, the react example was written as a quick one off to show that you can use react in your mod. I think it only can load commonJs from the node_modules folder as this line in the gulpfile suggests. I would look at the react package in In general I would not recommend starting new mods from the prototypes folder, as the name suggests they are not polished in any way. |
Beta Was this translation helpful? Give feedback.
If I remember, the react example was written as a quick one off to show that you can use react in your mod. I think it only can load commonJs from the node_modules folder as this line in the gulpfile suggests. I would look at the react package in
node_modules
and try to mimic the way it exposes its internals.In general I would not recommend starting new mods from the prototypes folder, as the name suggests they are not polished in any way.
Good luck!