1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-29 18:52:22 +01:00

fixes [:ctrlreg] The controller with the name '...' is not registered

This commit is contained in:
Sylvain 2020-09-21 13:23:28 +02:00
parent b2bbbf5c79
commit d43516f6fe
6 changed files with 9 additions and 46 deletions

View File

@ -70,10 +70,12 @@ require('../src/javascript/app.js');
require('../src/javascript/router.js');
require('../src/javascript/plugins.js.erb');
require.context('../src/javascript/controllers/', true, /.*/);
require.context('../src/javascript/services/', true, /.*/);
require.context('../src/javascript/directives/', true, /.*/);
require.context('../src/javascript/filters/', true, /.*/);
function importAll (r) { r.keys().forEach(r); }
importAll(require.context('../src/javascript/controllers/', true, /.*/));
importAll(require.context('../src/javascript/services/', true, /.*/));
importAll(require.context('../src/javascript/directives/', true, /.*/));
importAll(require.context('../src/javascript/filters/', true, /.*/));
require.context('../images', true);
require.context('../templates', true);

View File

@ -5,16 +5,16 @@ const sass = require('./loaders/sass');
const sassErb = require('./loaders/sass_erb');
const html = require('./loaders/html');
const fonts = require('./loaders/fonts');
const exposeApp = require('./loaders/expose_app');
const imports = require('./loaders/imports');
const webpack = require('webpack');
const path = require('path');
environment.plugins.prepend('Provide', new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery',
Hone: 'hone',
Tether: 'tether'
Tether: 'tether',
Application: [path.resolve(path.join(__dirname, '../../app/frontend/src/javascript/app.js')), 'Application']
}));
environment.loaders.prepend('js-erb', jsErb);
@ -24,9 +24,6 @@ environment.loaders.append('html', html);
environment.loaders.append('sass', sass);
environment.loaders.append('fonts', fonts);
environment.loaders.append('expose-app', exposeApp);
// environment.loaders.append('imports', imports);
environment.splitChunks();
module.exports = environment;

View File

@ -1,7 +0,0 @@
module.exports = {
test: require.resolve('../../../app/frontend/src/javascript/app.js'),
loader: 'expose-loader',
options: {
exposes: 'Application Application'
}
};

View File

@ -1,13 +0,0 @@
module.exports = {
test: /\.js(\?.erb)?$/,
use: [
{
loader: 'imports-loader',
options: {
imports: [
'default Application Application'
]
}
}
]
};

View File

@ -28,7 +28,6 @@
"expose-loader": "^1.0.0",
"file-loader": "^6.1.0",
"html-loader": "^1.3.0",
"imports-loader": "^1.1.0",
"rails-erb-loader": "^5.5.2",
"resolve-url-loader": "^3.1.1",
"webpack": "^4.44.1",

View File

@ -4422,16 +4422,6 @@ import-local@^2.0.0:
pkg-dir "^3.0.0"
resolve-cwd "^2.0.0"
imports-loader@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/imports-loader/-/imports-loader-1.1.0.tgz#1c3a388d0c5cd7f9eb08f3646d4aae3b70e57933"
integrity sha512-HcPM6rULdQ6EBLVq+5O+CF9xb7qiUjsRm6V28bTG/c3IU5sQkVZzUDwYY0r4jHvSAmVFdO9WA/vLAURR5WQSeQ==
dependencies:
loader-utils "^2.0.0"
schema-utils "^2.7.0"
source-map "^0.6.1"
strip-comments "^2.0.1"
imurmurhash@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
@ -8193,11 +8183,6 @@ strip-bom@^3.0.0:
resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3"
integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=
strip-comments@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/strip-comments/-/strip-comments-2.0.1.tgz#4ad11c3fbcac177a67a40ac224ca339ca1c1ba9b"
integrity sha512-ZprKx+bBLXv067WTCALv8SSz5l2+XhpYCsVtSqlMnkAXMWDq+/ekVbl1ghqP9rUHTzv6sm/DwCOiYutU/yp1fw==
strip-eof@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"