File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ const version = process.env.VERSION || require('../package.json').version
44
55module . exports = {
66 entry : 'src/index.js' ,
7- dest : 'dist/vuex.js' ,
8- format : 'umd' ,
7+ dest : process . env . ESM ? 'dist/vuex.esm.js' : 'dist/vuex.js' ,
8+ format : process . env . ESM ? 'es' : 'umd' ,
99 moduleName : 'Vuex' ,
1010 plugins : [
1111 replace ( { __VERSION__ : version } ) ,
Original file line number Diff line number Diff line change 33 "version" : " 2.1.3" ,
44 "description" : " state management for Vue.js" ,
55 "main" : " dist/vuex.js" ,
6+ "module" : " dist/vuex.esm.js" ,
67 "typings" : " types/index.d.ts" ,
78 "files" : [
89 " dist" ,
1415 "scripts" : {
1516 "dev" : " node examples/server.js" ,
1617 "dev:dist" : " rollup -wm -c build/rollup.config.js" ,
17- "build" : " npm run build:main && npm run build:logger" ,
18+ "build" : " npm run build:main && npm run build:esm && npm run build: logger" ,
1819 "build:main" : " rollup -c build/rollup.config.js && uglifyjs dist/vuex.js -cm --comments -o dist/vuex.min.js" ,
20+ "build:esm" : " rollup -c build/rollup.config.js --environment ESM" ,
1921 "build:logger" : " rollup -c build/rollup.logger.config.js" ,
2022 "lint" : " eslint src test" ,
2123 "test" : " npm run lint && npm run test:types && npm run test:unit && npm run test:e2e" ,
You can’t perform that action at this time.
0 commit comments