Hello, I am trying to make a section on my website for playing around with React.js. So I started using/playing with js.Build.
- My idea was to have a section (content/react) which would contain leaf page bundles. Then I would put the project files and directories in there (as page bundle resources) and js.Build “main.jsx” or some such.
However, js.Build seems to do different things if the resource comes from a Page Bundle instead of the assets directory.
I.e. I have ‘import * from “./Bar”’ in main.jsx, then in the assets/ directory this would work, but as a bundle resource, it won’t. Are there some options I can pass js build for this to work?
- Playing around with js.Build, I wanted to remove all babel calls from my pipelines. However, I have one function that is defined in assets/somescript.js, but called from the ‘onclick’ of a button somewhere. If I use js.Build, this functions gets removed >.< Is this because of ‘tree shaking’? It cannot find the call to my function?