diff --git a/build/webpack.dev.conf.js b/build/webpack.dev.conf.js index 662df01..b227edd 100644 --- a/build/webpack.dev.conf.js +++ b/build/webpack.dev.conf.js @@ -29,6 +29,10 @@ module.exports = merge(baseWebpackConfig, { filename: 'index.html', template: 'index.html', inject: true + }), + new webpack.ProvidePlugin({ + $: "jquery", + jQuery: "jquery" }) ] }) diff --git a/build/webpack.prod.conf.js b/build/webpack.prod.conf.js index e02b91a..d5fa636 100644 --- a/build/webpack.prod.conf.js +++ b/build/webpack.prod.conf.js @@ -28,6 +28,10 @@ webpackConfig.plugins = (webpackConfig.plugins || []).concat([ compress: { warnings: false } }), new webpack.optimize.OccurenceOrderPlugin(), + new webpack.ProvidePlugin({ + $: "jquery", + jQuery: "jquery" + }) ]) module.exports = webpackConfig diff --git a/src/main.js b/src/main.js index 94ab629..3f012c1 100644 --- a/src/main.js +++ b/src/main.js @@ -3,6 +3,7 @@ import Vue from 'vue' import App from './examples/App' + // supports both of Vue 1.0 and Vue 2.0 require('froala-editor/js/froala_editor.pkgd.min'); diff --git a/src/vue-froala.js b/src/vue-froala.js index e7c8b71..924868e 100644 --- a/src/vue-froala.js +++ b/src/vue-froala.js @@ -1,5 +1,3 @@ -var $ = require('jquery'); - export default (Vue, Options = {}) => {