https://github.com/wenyan-lang/wenyan
Raw File
Tip revision: 20db12a8fe4ae1488bd54435a8e1b6fe63b003f2 authored by Anthony Fu on 10 January 2020, 06:33:34 UTC
release v0.2.3
Tip revision: 20db12a
webpack.config.js
const webpack = require('webpack')
const baseConfig = require('./webpack.base.config')

const Cli = {
  ...baseConfig(),
  target: 'node',
  entry: {
    cli: './src/cli.js',
  },
  plugins: [
    new webpack.BannerPlugin({
      banner: '#!/usr/bin/env node',
      raw: true,
    }),
  ],
  mode: "development",
  optimization: {
		minimize: false,
	},
}

const Core = {
  ...baseConfig(),
  entry: {
    core: './src/parser.js',
  }
}

Core.output.library = 'Wenyan'

const Utils = {
  ...baseConfig(),
  entry: {
    render: './src/render.js',
    runtime: './src/browser_runtime.js',
  }
}

module.exports = [Cli, Core, Utils]
back to top