updae script
This commit is contained in:
parent
410c9a9d96
commit
4e97e5e86a
1 changed files with 19 additions and 13 deletions
|
|
@ -1,16 +1,22 @@
|
||||||
import webpack from "webpack";
|
import webpack from 'webpack';
|
||||||
import path from "path";
|
import { fileURLToPath } from 'url';
|
||||||
|
|
||||||
const __dirname = path.resolve(path.dirname(decodeURI(new URL(import.meta.url).pathname))).slice(3);
|
const isDevelopment = process.env.NODE_ENV !== 'production';
|
||||||
|
|
||||||
console.log(path.resolve(path.dirname(decodeURI(new URL(import.meta.url).pathname))), __dirname);
|
/**
|
||||||
|
* @type {webpack.Configuration}
|
||||||
webpack({
|
*/
|
||||||
entry: path.join(__dirname, './rewrite/index.js'),
|
const config = {
|
||||||
|
mode: isDevelopment ? 'development' : 'production',
|
||||||
|
entry: fileURLToPath(new URL('./rewrite/index.js', import.meta.url)),
|
||||||
output: {
|
output: {
|
||||||
path: __dirname,
|
path: fileURLToPath(new URL('./lib/', import.meta.url)),
|
||||||
filename: './lib/uv.bundle.js',
|
filename: 'uv.bundle.js',
|
||||||
}
|
},
|
||||||
}, (err, i) =>
|
performance: {
|
||||||
console.log(!err ? 'Ultraviolet bundled!' : e)
|
// suppress "entrypoint size limit" warning
|
||||||
);
|
hints: false,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default config;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue