feat(board): 更新python_pyodide下 Teachable Machine
This commit is contained in:
@@ -1,14 +1,18 @@
|
||||
const path = require("path");
|
||||
const common = require("../../../webpack.common");
|
||||
const { merge } = require("webpack-merge");
|
||||
const path = require('path');
|
||||
const common = require('../../../webpack.common');
|
||||
const { merge } = require('webpack-merge');
|
||||
const { VueLoaderPlugin } = require('vue-loader');
|
||||
|
||||
module.exports = merge(common, {
|
||||
|
||||
const webpackConfig = merge(common, {
|
||||
resolve: {
|
||||
alias: {
|
||||
'@mixly/python': path.resolve(__dirname, '../python'),
|
||||
'@mixly/python-mixpy': path.resolve(__dirname, '../python_mixpy')
|
||||
'@mixly/python-mixpy': path.resolve(__dirname, '../python_mixpy'),
|
||||
'vue$': 'vue/dist/vue.esm-bundler.js',
|
||||
'@': __dirname
|
||||
},
|
||||
extensions: ['.ts', '.js'],
|
||||
extensions: ['*', '.ts', '.js', '.vue', '.json'],
|
||||
fallback: {
|
||||
// for ocaml bundle
|
||||
constants: require.resolve('constants-browserify'),
|
||||
@@ -28,7 +32,21 @@ module.exports = merge(common, {
|
||||
{
|
||||
resourceQuery: /asset-url/,
|
||||
type: 'asset/resource',
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.scss$/,
|
||||
use: ['vue-style-loader', 'css-loader', 'sass-loader'],
|
||||
},
|
||||
]
|
||||
}
|
||||
});
|
||||
},
|
||||
plugins: [
|
||||
new VueLoaderPlugin()
|
||||
]
|
||||
});
|
||||
|
||||
webpackConfig.module.rules.unshift({
|
||||
test: /\.vue$/,
|
||||
use: ['vue-loader']
|
||||
});
|
||||
|
||||
module.exports = webpackConfig;
|
||||
Reference in New Issue
Block a user