Add special case for some plugin specs to webpack

For some reason some plugins like analytics have specs that
live in `spec_canvas/coffeescripts` it seems that webpack never
properly picked those up and complained about it in warnings.

Test Plan:
  - Webpack tests pass

Change-Id: I1c84f6850aa0501a5659aabde7768257e97a9253
Reviewed-on: https://gerrit.instructure.com/78723
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
This commit is contained in:
Clay Diffrient 2016-05-04 10:58:01 -06:00
parent c8ebf86859
commit 77a8e49891
2 changed files with 10 additions and 1 deletions

View File

@ -95,7 +95,8 @@ module.exports = {
include: [
path.resolve(__dirname, "../app/coffeescript"),
path.resolve(__dirname, "../spec/coffeescripts"),
/gems\/plugins\/.*\/app\/coffeescripts\//
/gems\/plugins\/.*\/app\/coffeescripts\//,
/gems\/plugins\/.*\/spec_canvas\/coffeescripts\//
],
loaders: [
"coffee-loader",

View File

@ -42,6 +42,14 @@ testWebpackConfig.module.loaders.push({
loaders: ["qunitDependencyLoader"]
});
// Some plugins use a special spec_canvas path for their specs
testWebpackConfig.module.loaders.push({
test: /\/spec_canvas\/coffeescripts\//,
loaders: [
'qunitDependencyLoader'
]
});
testWebpackConfig.module.loaders.push({
test: /\/spec\/javascripts\/jsx\//,
loaders: ["qunitJsxDependencyLoader"]