Remove pluginsJstLoader

Change-Id: Ia09179d5775ad4480e8d5406de49ec19e967b5ce
Reviewed-on: https://gerrit.instructure.com/108144
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
This commit is contained in:
Ryan Shaw 2017-04-10 14:55:12 -06:00
parent e68a26c507
commit f84575eef9
2 changed files with 1 additions and 23 deletions

View File

@ -145,15 +145,6 @@ module.exports = {
test: /vendor\/i18n/,
loaders: ['exports-loader?I18n']
},
{
test: /\.js$/,
include: path.resolve(__dirname, '../public/javascripts'),
loaders: happify('js', [
path.join(root, 'frontend_build/pluginsJstLoader'),
])
},
{
test: /\.js$/,
include: [
@ -179,8 +170,7 @@ module.exports = {
/gems\/plugins\/.*\/spec_canvas\/coffeescripts\//
],
loaders: happify('coffee', [
'coffee-loader',
path.join(root, 'frontend_build/pluginsJstLoader')
'coffee-loader'
])
},
{

View File

@ -1,12 +0,0 @@
// We used to compile jst templates into the app before requiring,
// but with webpack we can pull them right out of the plugins,
// this takes requirements for "analytics/jst/thing" and rewrites them
// to "analytics/app/views/jst/thing" so that they can be found off of
// the "gem/plugins" directory in the webpack path resolve config
const pluginJstRegexp = /('|")[^/\s]+\/jst\//g
module.exports = function (input) {
this.cacheable()
return input.replace(pluginJstRegexp, match => match.replace('jst', 'app/views/jst'))
}