2023-02-26 01:30
This commit is contained in:
35
getting-lit-element/webpack.config.js
Normal file
35
getting-lit-element/webpack.config.js
Normal file
@@ -0,0 +1,35 @@
|
||||
const path = require('path');
|
||||
module.exports = {
|
||||
entry: {
|
||||
main: './src/index.ts',
|
||||
},
|
||||
output: {
|
||||
filename: 'bundle.js',
|
||||
//path: path.resolve(__dirname, 'build')
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.ts$/,
|
||||
include: '/src',
|
||||
exclude: '/node_modules/',
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
presets: ['@babel/preset-typescript'],
|
||||
plugins: ['@babel/plugin-proposal-decorators']
|
||||
}
|
||||
}
|
||||
}, {
|
||||
test: /\.html$/, include: '/src',
|
||||
use: ['file-loader?name=[name].[ext]', 'extract-loader', 'html-loader']
|
||||
}
|
||||
]
|
||||
},
|
||||
mode: 'development',
|
||||
watch: true,
|
||||
optimization: {
|
||||
minimize: true,
|
||||
concatenateModules: true
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user