зеркало из https://github.com/mozilla/kitsune.git
apply babel to all js files (#4853)
rename *.es6 files back to *.js https://github.com/mozilla/sumo-project/issues/879
This commit is contained in:
Родитель
d67d6a07f0
Коммит
ad1c65377d
|
@ -45,14 +45,14 @@ describe('instant search', () => {
|
|||
// actually tested below, but are required to get the rest of the
|
||||
// tests to pass. This should be revisited when we have a frontend
|
||||
// build process in place.
|
||||
global.tabsInit = require('../sumo-tabs.es6').tabsInit;
|
||||
global.tabsInit = require('../sumo-tabs.js').tabsInit;
|
||||
global.detailsInit = require('../protocol-details-init.js').detailsInit;
|
||||
|
||||
|
||||
rerequire('../i18n.js');
|
||||
global.interpolate = global.window.interpolate;
|
||||
rerequire('../search_utils.es6');
|
||||
rerequire('../instant_search.es6');
|
||||
rerequire('../search_utils.js');
|
||||
rerequire('../instant_search.js');
|
||||
|
||||
let content = (
|
||||
<div>
|
||||
|
|
|
@ -22,7 +22,7 @@ module.exports = (env, argv) => {
|
|||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.es6$/,
|
||||
test: /\.js$/,
|
||||
exclude: /node_modules/,
|
||||
use: {
|
||||
loader: "babel-loader",
|
||||
|
|
|
@ -13,7 +13,7 @@ module.exports = {
|
|||
"nunjucks/browser/nunjucks-slim.js",
|
||||
"sumo/js/nunjucks.js",
|
||||
"sumo/js/cached_xhr.js",
|
||||
"sumo/js/search_utils.es6",
|
||||
"sumo/js/search_utils.js",
|
||||
"sumo/js/browserdetect.js",
|
||||
"sumo/js/libs/uitour.js",
|
||||
"sumo/js/kbox.js",
|
||||
|
@ -22,7 +22,7 @@ module.exports = {
|
|||
"sumo/js/geoip-locale.js",
|
||||
"sumo/js/ui.js",
|
||||
"sumo/js/analytics.js",
|
||||
"sumo/js/instant_search.es6",
|
||||
"sumo/js/instant_search.js",
|
||||
"sumo/js/responsive-nav-toggle.js",
|
||||
"sumo/js/profile-avatars.js",
|
||||
"./webpack/protocol-compat.js",
|
||||
|
@ -37,13 +37,13 @@ module.exports = {
|
|||
"protocol/js/protocol-newsletter.js",
|
||||
"protocol/js/protocol-notification-bar.js",
|
||||
"protocol/js/protocol-lang-switcher.js",
|
||||
"sumo/js/protocol-nav.es6",
|
||||
"sumo/js/protocol-nav.js",
|
||||
"sumo/js/protocol-details-init.js",
|
||||
"sumo/js/protocol-modal-init.es6",
|
||||
"sumo/js/protocol-modal-init.js",
|
||||
"sumo/js/protocol-notification-init.js",
|
||||
"sumo/js/protocol-language-switcher-init.js",
|
||||
"sumo/js/sumo-tabs.es6",
|
||||
"sumo/js/sumo-close-this.es6",
|
||||
"sumo/js/sumo-tabs.js",
|
||||
"sumo/js/sumo-close-this.js",
|
||||
],
|
||||
"common.fx.download": [
|
||||
"sumo/js/show-fx-download.js",
|
||||
|
|
|
@ -13,7 +13,7 @@ module.exports = [
|
|||
"../kitsune/sumo/static/sumo/js/protocol-details-init.js",
|
||||
"detailsInit detailsInit"
|
||||
),
|
||||
expose("../kitsune/sumo/static/sumo/js/sumo-tabs.es6", "tabsInit tabsInit"),
|
||||
expose("../kitsune/sumo/static/sumo/js/sumo-tabs.js", "tabsInit tabsInit"),
|
||||
// wrap these files to make them behave like an es6 module, exporting the named variable, and expose that globally:
|
||||
exportAndExpose(
|
||||
"../kitsune/sumo/static/sumo/js/libs/uitour.js",
|
||||
|
|
Загрузка…
Ссылка в новой задаче