parent
e83b4537fe
commit
370e827217
|
@ -114,7 +114,7 @@
|
|||
"snapshot-diff": "0.4.0",
|
||||
"strip-ansi": "4.0.0",
|
||||
"tempy": "0.2.1",
|
||||
"webpack": "3.12.0"
|
||||
"webpack": "4.39.1"
|
||||
},
|
||||
"scripts": {
|
||||
"prepublishOnly": "echo \"Error: must publish from dist/\" && exit 1",
|
||||
|
|
|
@ -99,7 +99,7 @@ async function run(params) {
|
|||
await execa("rm", ["-rf", ".cache"]);
|
||||
}
|
||||
|
||||
const bundleCache = new Cache(".cache/", "v13");
|
||||
const bundleCache = new Cache(".cache/", "v14");
|
||||
await bundleCache.load();
|
||||
|
||||
console.log(chalk.inverse(" Building packages "));
|
||||
|
|
|
@ -176,13 +176,16 @@ function getWebpackConfig(bundle) {
|
|||
path: path.resolve(root, "dist"),
|
||||
filename: bundle.output,
|
||||
library: ["prettierPlugins", bundle.name],
|
||||
libraryTarget: "umd"
|
||||
libraryTarget: "umd",
|
||||
// https://github.com/webpack/webpack/issues/6642
|
||||
globalObject: 'new Function("return this")()'
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
"process.env.NODE_ENV": JSON.stringify("production")
|
||||
})
|
||||
]
|
||||
optimization: {
|
||||
// TODO: enable this
|
||||
// `parser-postcss.js` can't work with terser
|
||||
// https://github.com/prettier/prettier/pull/6200#issuecomment-500018106
|
||||
minimize: false
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue