Closed artemave closed 5 years ago
Hey,
Are you sure the app/assets
are added to the app?
You have to update webpack.config.js
to copy the assets
-folder to the app-bundle.
new CopyWebpackPlugin([
{ from: { glob: "fonts/**" } },
{ from: { glob: "**/*.jpg" } },
{ from: { glob: "**/*.png" } },
{ from: { glob: 'assets/**'} }, // add this
])
If the assets
are added and it still doesn't work, you can enable tracing with this:
import * as trace from 'tns-core-modules/trace';
trace.setCategories('NOTA');
trace.enable();
and give me the output.
Ah! Spot on - I forgot about webpack. It works now. Thank you!
Which platform(s) does your issue occur on?
Please, provide the following version numbers that your issue occurs with:
I am trying to inject smooth-scroll into the page with the following code:
But I get this error:
note:
~/assets/smooth-scroll.js
is copied fromnode_modules/smooth-scroll/dist/smooth-scroll.js
intoapp/assets
Possibly relevant logs:
Looks like I am doing something wrong, but I can't figure out what.