Compare commits

..

4 Commits

Author SHA1 Message Date
semantic-release-bot 5835d7cf66 chore(release): 4.1.0-develop.1 [skip ci]
# [4.1.0-develop.1](https://git.lumeweb.com/LumeWeb/presetter-preset-rollup/compare/v4.0.2-develop.12...v4.1.0-develop.1) (2023-07-02)

### Bug Fixes

* inject browser options into node-resolve plugin if config.browser is true ([70a531e](70a531e5aa))

### Features

* add plugin-wasm ([57ef73d](57ef73d9dc))
2023-07-02 08:01:16 +00:00
Derrick Hammer 30554e2dfe
Merge remote-tracking branch 'origin/develop' into develop 2023-07-02 04:00:12 -04:00
Derrick Hammer 57ef73d9dc
feat: add plugin-wasm 2023-07-02 03:59:58 -04:00
Derrick Hammer 70a531e5aa
fix: inject browser options into node-resolve plugin if config.browser is true 2023-07-02 03:59:42 -04:00
5 changed files with 42 additions and 4 deletions

View File

@ -1,3 +1,15 @@
# [4.1.0-develop.1](https://git.lumeweb.com/LumeWeb/presetter-preset-rollup/compare/v4.0.2-develop.12...v4.1.0-develop.1) (2023-07-02)
### Bug Fixes
* inject browser options into node-resolve plugin if config.browser is true ([70a531e](https://git.lumeweb.com/LumeWeb/presetter-preset-rollup/commit/70a531e5aa88a68afb67b0ff7902fcfda2d6c298))
### Features
* add plugin-wasm ([57ef73d](https://git.lumeweb.com/LumeWeb/presetter-preset-rollup/commit/57ef73d9dcfcd835932db0393912eec770c22269))
## [4.0.2-develop.12](https://git.lumeweb.com/LumeWeb/presetter-preset-rollup/compare/v4.0.2-develop.11...v4.0.2-develop.12) (2023-07-02)

View File

@ -19,3 +19,5 @@ plugins:
- inject:
insertAt: top
- '@apply rollup-plugin-visualizer[visualizer]'
- - '@apply @rollup/plugin-wasm[default]'
- targetEnv: auto-inline

4
npm-shrinkwrap.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@lumeweb/presetter-preset-rollup",
"version": "4.0.2-develop.12",
"version": "4.1.0-develop.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@lumeweb/presetter-preset-rollup",
"version": "4.0.2-develop.12",
"version": "4.1.0-develop.1",
"license": "MIT",
"dependencies": {
"presetter-preset-strict": "^4.0.1",

View File

@ -1,6 +1,6 @@
{
"name": "@lumeweb/presetter-preset-rollup",
"version": "4.0.2-develop.12",
"version": "4.1.0-develop.1",
"description": "An opinionated presetter preset for using rollup as a bundler",
"keywords": [
"presetter",

View File

@ -75,7 +75,31 @@ export default function (): PresetAsset {
noSymlinks: ['rollup.config.ts'],
supplementaryConfig: {
'gitignore': ['/rollup.config.ts'],
'rollup': resolve(CONFIGS, 'rollup.yaml'),
'rollup': (context) => {
const content = loadFile(resolve(CONFIGS, 'rollup.yaml')) as any;
if (context.custom.config.browser) {
let plugins = content.plugins.map((item) =>
Array.isArray(item) ? item[0] : item,
);
let resolvePluginName = plugins.filter((item) =>
item.includes('node-resolve'),
);
if (resolvePluginName.length) {
const index = plugins.indexOf(resolvePluginName[0]);
if (!Array.isArray(content.plugins[index])) {
content.plugins[index] = [content.plugins[index], {}];
}
content.plugins[index][1] = {
browser: true,
preferBuiltins: false,
};
}
}
return content;
},
'tsconfig': {
compilerOptions: {
moduleResolution: 'nodenext',