enable preventAssignment
This commit is contained in:
parent
9dcef380f4
commit
7c9dc72df1
2 changed files with 17 additions and 16 deletions
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "aptabase-js",
|
"name": "root",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
|
|
|
@ -1,35 +1,36 @@
|
||||||
import replace from "@rollup/plugin-replace";
|
import replace from '@rollup/plugin-replace';
|
||||||
import terser from "@rollup/plugin-terser";
|
import terser from '@rollup/plugin-terser';
|
||||||
import typescript from "@rollup/plugin-typescript";
|
import typescript from '@rollup/plugin-typescript';
|
||||||
import pkg from "./package.json" assert { type: "json" };
|
import pkg from './package.json' assert { type: 'json' };
|
||||||
|
|
||||||
const plugins = [
|
const plugins = [
|
||||||
terser(),
|
terser(),
|
||||||
replace({
|
replace({
|
||||||
"env.PKG_VERSION": pkg.version,
|
'env.PKG_VERSION': pkg.version,
|
||||||
|
preventAssignment: true,
|
||||||
}),
|
}),
|
||||||
typescript({
|
typescript({
|
||||||
tsconfig: "./tsconfig.json",
|
tsconfig: './tsconfig.json',
|
||||||
moduleResolution: "node",
|
moduleResolution: 'node',
|
||||||
}),
|
}),
|
||||||
];
|
];
|
||||||
|
|
||||||
const cjs = {
|
const cjs = {
|
||||||
input: "./src/index.ts",
|
input: './src/index.ts',
|
||||||
output: {
|
output: {
|
||||||
dir: "./dist",
|
dir: './dist',
|
||||||
entryFileNames: "[name].js",
|
entryFileNames: '[name].js',
|
||||||
format: "cjs",
|
format: 'cjs',
|
||||||
},
|
},
|
||||||
plugins,
|
plugins,
|
||||||
};
|
};
|
||||||
|
|
||||||
const es = {
|
const es = {
|
||||||
input: "./src/index.ts",
|
input: './src/index.ts',
|
||||||
output: {
|
output: {
|
||||||
dir: "./dist",
|
dir: './dist',
|
||||||
entryFileNames: "[name].mjs",
|
entryFileNames: '[name].mjs',
|
||||||
format: "es",
|
format: 'es',
|
||||||
},
|
},
|
||||||
plugins,
|
plugins,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue