webpack.common.js
Home
/
webpack.common.js
const path = require('path');
module.exports = {
entry: {
'main': path.resolve(__dirname, 'App', 'boot.ts'),
'editor.worker': 'monaco-editor/esm/vs/editor/editor.worker.js',
'json.worker': 'monaco-editor/esm/vs/language/json/json.worker',
'css.worker': 'monaco-editor/esm/vs/language/css/css.worker',
'html.worker': 'monaco-editor/esm/vs/language/html/html.worker',
'ts.worker': 'monaco-editor/esm/vs/language/typescript/ts.worker'
},
resolve: {
extensions: [".ts", ".js", ".json"]
},
module: {
rules: [
{
test: /\.txt$/,
use: 'raw-loader'
},
{
//ts to js
test: /\.ts$/,
use: 'ts-loader'
},
{
//html to js
test: /\.html$/,
use: 'html-loader'
},
{
//css to js to inline style append
test: /\.css$/,
use: ['style-loader', 'css-loader']
},
{
//less to css to js to inline style append
test: /\.less$/,
use: ['style-loader', 'css-loader', 'less-loader']
}
]
}
};