Update(boards): 添加文件实时重载,在板卡目录 npm run serve 启动

This commit is contained in:
王立帮
2024-10-04 21:38:34 +08:00
parent 82b2524fda
commit 0e64b5088f
36 changed files with 323 additions and 36 deletions

View File

@@ -3,6 +3,7 @@
"version": "1.3.0",
"description": "适用于mixly的micropython robot模块",
"scripts": {
"serve": "webpack-dev-server --config=webpack.dev.js",
"build:dev": "webpack --config=webpack.dev.js",
"build:prod": "webpack --config=webpack.prod.js",
"build:examples": "node ../../../scripts/build-examples.js -t special",

View File

@@ -16,6 +16,21 @@ module.exports = merge(common, {
template: path.resolve(process.cwd(), 'template.xml'),
filename: 'index.xml',
minify: false
}),
]
})
],
devServer: {
https: true,
port: 8080,
host: '0.0.0.0',
hot: true,
static: {
directory: path.join(process.cwd(), '../../../'),
watch: false
},
devMiddleware: {
index: false,
publicPath: `/boards/default/${path.basename(process.cwd())}`,
writeToDisk: false
}
}
});