ID photo of Ciro Santilli taken in 2013 right eyeCiro Santilli OurBigBook logoOurBigBook.com  Sponsor 中国独裁统治 China Dictatorship 新疆改造中心、六四事件、法轮功、郝海东、709大抓捕、2015巴拿马文件 邓家贵、低端人口、西藏骚乱
webpack/template/index.js
// A simple external Js dependency.
import _ from 'lodash'

// A simple external CSS dependency.
import 'normalize.css/normalize.css'

// A more complex external Js + CSS dependency.
import 'katex/dist/katex.css'
import katex from 'katex'

// Internal dependencies.
import './main.css'
import './main.scss'
import { notindex_constant } from './notindex.js'
// require is not recommended, but also works if you need it to.
const { cjs_constant, cjs_func } = require('./cjs.js')

function component() {
  const element = document.createElement('div');
  element.innerHTML = _.join(
    [
      'Hello',
      'webpack',
      notindex_constant,
      cjs_constant,
      cjs_func(),
      katex.renderToString('\\frac{1}{\\sqrt{2}}')
    ],
    ' '
  );
  return element;
}

document.body.appendChild(component());

// exports will be usable from the browser, see libraryTarget
// in webpack.common.js.
export const my_exported_var = 'my_exported_var_value';