How to include script located in node_modules folder using codeigniter 4? |
I need to install this plugin on my application, so I followed the instruction and executed:
PHP Code: npm install --save @ckeditor/ckeditor5-upload Usually, to load a plugin I create a file inside the `load` directory which contains the plugin name, in particular: PHP Code: Views which contains this: PHP Code: <!-- Push section js --> so to include in a specific section of my app, I simply do: PHP Code: <?= $this->include('App\Views\Backend\load\ckeditor') ?> and this will inject the plugin into my app, but how can I do this with local dependencies installed via npm?
If you look on that page the last code sample is for 2 editors but it is showing all the html code.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
You will need to use a build process to build/copy files you need from node_modules into public/assets/ (or whatever your assets folder is called).
E.g. Webpack, Laravel Mix, Parcel, Rollup, Gulp. There are so many. |
Welcome Guest, Not a member yet? Register Sign In |