activar stimulus

This commit is contained in:
f 2020-11-19 20:38:33 -03:00
parent b5be8299d9
commit 2d46c68904
4 changed files with 10 additions and 7 deletions

View file

@ -0,0 +1,9 @@
// Load all the controllers within this directory and all subdirectories.
// Controller files must be named *_controller.js.
import { Application } from "stimulus"
import { definitionsFromContext } from "stimulus/webpack-helpers"
const application = Application.start()
const context = require.context("controllers", true, /_controller\.js$/)
application.load(definitionsFromContext(context))

View file

@ -17,13 +17,7 @@
import 'core-js/stable' import 'core-js/stable'
import 'regenerator-runtime/runtime' import 'regenerator-runtime/runtime'
import 'controllers'
import { Application } from 'stimulus'
import { definitionsFromContext } from "stimulus/webpack-helpers"
const application = Application.start()
const context = require.context("./controllers", true, /\.js$/)
application.load(definitionsFromContext(context))
import {EditorState} from "prosemirror-state" import {EditorState} from "prosemirror-state"
import {EditorView} from "prosemirror-view" import {EditorView} from "prosemirror-view"