Laravel Mix添加依赖项

时间:2017-06-25 14:10:24

标签: laravel laravel-5.4 mix simplemde

我希望在Laravel Mix编译中使用sparksuite/simplemde-markdown-editor

我已在 app.scss

中添加此行
  

@import“node_modules / simplemde / dist / simplemde.min.css”;

app.js 中的这一行:

  

window.SimpleMDE = require('simplemde');

我想在我的项目中编译这个插件......

1 个答案:

答案 0 :(得分:0)

/* in webpack.mix.js file add following lines at the end  */

mix.js('resources/assets/js/app.js', 'public/js')

   .sass('resources/assets/sass/app.scss', 'public/css');

在终端

中添加Run below命令后
  1. npm run dev (或)
  2. npm run watch