pastebin/webpack.config.js

53 lines
994 B
JavaScript
Raw Normal View History

2019-10-14 13:16:12 +00:00
const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin")
const { StatsWriterPlugin } = require("webpack-stats-plugin")
2019-10-11 09:10:11 +00:00
2019-09-20 14:00:28 +00:00
module.exports = {
entry: './js/index',
output: {
2019-10-14 13:16:12 +00:00
filename: 'static/js/[chunkhash].js',
2019-09-20 14:00:28 +00:00
path: __dirname,
},
2019-10-09 10:23:25 +00:00
module: {
rules: [
2019-10-14 05:22:04 +00:00
{
test: /\.tsx?$/,
use: 'ts-loader',
},
2019-10-09 10:23:25 +00:00
{
test: /\.css$/i,
use: ['style-loader', 'css-loader'],
},
],
},
2019-10-14 05:22:04 +00:00
resolve: {
extensions: ['.ts', '.js'],
},
2019-10-11 09:10:11 +00:00
plugins: [
new MonacoWebpackPlugin({
output: 'static/js',
languages: [
2019-10-14 13:16:12 +00:00
'csharp',
2019-10-11 09:10:11 +00:00
'cpp',
'html',
'java',
'javascript',
'markdown',
'objective-c',
'perl',
'php',
'python',
'rust',
'shell',
'sql',
'typescript',
],
}),
2019-10-14 13:16:12 +00:00
new StatsWriterPlugin({
filename: 'entry',
transform(data) {
return data.assetsByChunkName.main
},
}),
2019-10-11 09:10:11 +00:00
],
2019-09-20 14:00:28 +00:00
}