Trying to add few JS plugins for my sage 9 project and running into terminal issues.
I added the plugins by doing
yarn add <plugin_name> one by one for each plugin
Then I included them by writing this in main.js
import 'jquery-ui'; import 'chosen/main'; import 'highcharts/highcharts'; import 'lazyload/lazyload'; import 'mailcheck/src/mailcheck.min'; import 'parsleyjs/dist/parsley.min'; import 'selectize/dist/js/selectize.min'; import 'sticky-kit/dist/sticky-kit.min'; import 'wow/lib/main';
Then I ran
This makes me run into this error which is terrible and I am stuck right there. Tried adding babel-loader and she-bang loader in webpack.config.js but no help.
ERROR Failed to compile with 1 errors
error in ./node_modules/wow/lib/main.js Module parse failed: Unexpected character '#' (1:0) You may need an appropriate loader to handle this file type. | #!/usr/bin/env node | var com = require("./command.js"); |
Please save me someone. Help me get out of it and use js plugins with peace.
The error is just an example fow the ‘wow’ plugin. I am getting the same error for all of the plugins.