blockbench/webpack.config.js

36 lines
793 B
JavaScript
Raw Normal View History

2021-02-10 05:26:52 +08:00
const PathModule = require('path')
const {DefinePlugin} = require('webpack')
2021-02-10 05:26:52 +08:00
module.exports = {
mode: 'production',
target: 'node',
entry: './src/index.js',
output: {
filename: 'bundle.js',
path: PathModule.resolve(__dirname, 'js', 'webpack')
},
module: {
rules: [
{
test: /\.(jpg|png)$/,
use: {
loader: 'url-loader'
}
2021-06-17 05:31:02 +08:00
},
{
test: /\.bbkeymap$/,
type: 'json'
2021-08-08 20:51:00 +08:00
},
{
test: /\.bbtheme$/,
type: 'json'
2021-02-10 05:26:52 +08:00
}
]
},
plugins: [
new DefinePlugin({
BBVERSION: `"${require('./package.json').version}"`
})
]
2021-02-10 05:26:52 +08:00
}