mirror of
https://github.com/logseq/logseq.git
synced 2026-02-01 22:47:36 +00:00
wip: webpack integration
This commit is contained in:
29
webpack.config.js
Normal file
29
webpack.config.js
Normal file
@@ -0,0 +1,29 @@
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
|
||||
module.exports = {
|
||||
mode: "development",
|
||||
entry: './target/index.js',
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'static/js/libs'),
|
||||
filename: 'bundle.js',
|
||||
clean: true,
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
// docs: https://webpack.js.org/configuration/module/#resolvefullyspecified
|
||||
test: /\.m?js/,
|
||||
resolve: {
|
||||
fullySpecified: false,
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
// fix "process is not defined" error:
|
||||
new webpack.ProvidePlugin({
|
||||
process: 'process/browser',
|
||||
}),
|
||||
],
|
||||
};
|
||||
Reference in New Issue
Block a user