Fix Webpack-imported modules
This commit is contained in:
@ -257,7 +257,7 @@ $(document).on('turbolinks:load', function () {
|
|||||||
|
|
||||||
var highlightCode = function () {
|
var highlightCode = function () {
|
||||||
$('pre code').each(function (index, element) {
|
$('pre code').each(function (index, element) {
|
||||||
hljs.highlightBlock(element);
|
hljs.highlightElement(element);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
2
app/javascript/d3-tip.js
vendored
2
app/javascript/d3-tip.js
vendored
@ -1,5 +1,5 @@
|
|||||||
/* eslint no-console:0 */
|
/* eslint no-console:0 */
|
||||||
|
|
||||||
// JS
|
// JS
|
||||||
import * as d3Tip from 'd3-tip'
|
import * as d3Tip from 'd3-tip/dist'
|
||||||
window.d3.tip = d3Tip;
|
window.d3.tip = d3Tip;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* eslint no-console:0 */
|
/* eslint no-console:0 */
|
||||||
|
|
||||||
// JS
|
// JS
|
||||||
import * as hljs from 'highlight.js'
|
import hljs from 'highlight.js/lib/common'
|
||||||
window.hljs = hljs;
|
window.hljs = hljs;
|
||||||
|
|
||||||
// CSS
|
// CSS
|
||||||
|
@ -21,9 +21,11 @@ const envConfig = module.exports = {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
|
extensions: ['.css', '.ts', '.tsx'],
|
||||||
alias: {
|
alias: {
|
||||||
$: 'jquery/src/jquery',
|
$: 'jquery/src/jquery',
|
||||||
jquery: 'jquery/src/jquery',
|
jquery: 'jquery/src/jquery',
|
||||||
|
vis$: 'vis/dist/vis',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
@ -36,7 +38,6 @@ const envConfig = module.exports = {
|
|||||||
Popper: ['popper.js', 'default'], // for Bootstrap 4
|
Popper: ['popper.js', 'default'], // for Bootstrap 4
|
||||||
_: 'underscore',
|
_: 'underscore',
|
||||||
vis: 'vis',
|
vis: 'vis',
|
||||||
hljs: 'highlight.js',
|
|
||||||
d3: 'd3',
|
d3: 'd3',
|
||||||
Sentry: '@sentry/browser',
|
Sentry: '@sentry/browser',
|
||||||
Sortable: 'sortablejs',
|
Sortable: 'sortablejs',
|
||||||
|
Reference in New Issue
Block a user