Comments (8)
Whoops, that's a problem! We need to support localization better.
You might take a look at a Rollup plugin to copy this folder. I don't think _locales
needs to be web accessible, so it should work. My favorite one is rollup-plugin-copy2
, since it works well with rollup-plugin-zip
, which makes releases a breeze.
from chrome-extension-tools.
Thanks, I've done something similar for the time being ππΌ
from chrome-extension-tools.
Hi @rick-stevens! We've added _locales support on the beta release npm i rollup-plugin-chrome-extension@beta -D
. Could you give it a can test run on your MV2 extension? π§ (MV3 support is not finished yet).
It should work without adding the _locales in the web accessible resources folder π
from chrome-extension-tools.
That's great! I've temporarily moved to a custom Vite stup to support MV3, so I can't easily test in my current project. But the reproduction steps are quite simple and not related to a specific project structure. Happy that works now. Awaiting MV3 support! ππΌ
from chrome-extension-tools.
@rick-stevens Have you been able to get HMR working with vite? π€ We'll be working on the reloader next week and I wanted to know what others are using for reloading in all the different contexts (background, content scripts, etc) during development.
from chrome-extension-tools.
i tried to copy the transalation folder, it's creating the folder for sec, but then it's removed somehow. any idea how to resolve this?
import copy from 'rollup-plugin-copy'
copy({
targets: [
{ src: 'src/_locales/**/*.json', dest: 'dist/_locales' },
]
}),
from chrome-extension-tools.
resolved with :
import execute from 'rollup-plugin-execute'
execute('yarn postbuild && yarn copy')
where running cp cli commands
from chrome-extension-tools.
@rick-stevens Have you been able to get HMR working with vite? π€ We'll be working on the reloader next week and I wanted to know what others are using for reloading in all the different contexts (background, content scripts, etc) during development.
Sorry, I havent. I went for quick and dirty:
{
"scripts": {
"build:background": "vite build --config background.vite.config.js",
"build:content": "vite build --config content.vite.config.js",
"build:options": "vite build --config options.vite.config.js",
"build": "rimraf dist && concurrently yarn:build:*"
}
}
And used the /public
folder for the manifest, locales, icons and CSS.
from chrome-extension-tools.
Related Issues (20)
- Assets loaded in content script result in 404 HOT 2
- Importing manifest.json in your app causes the CRXJS-generated manifest to be overwritten HOT 1
- match_origin_as_fallback field is missing in manifest schema HOT 1
- [crx:content-script-resources] Error: vite manifest is missing HOT 5
- Is there a method to simply copy without modifying the content_scripts?
- CSS in content_script is ignored. HOT 1
- crxjs does not support HTTPS flag in vite HOT 1
- Vite build for firefox
- inject.js error HOT 2
- Add React components interaction with content script example on the docs HOT 12
- Vite error in production build HOT 4
- Files imported with ?raw not updating after changes
- import of images in content_scripts are resulting in 404 HOT 3
- chrome.storage.local is undefined in content script
- `vite-plugin` breaks Vite dev server when `build.rollupOptions.input`s are present HOT 1
- Upgrade monorepo pnpm version to 8.x
- HRM and service script loader causes modules to be loaded twice with vite HOT 2
- Π‘anβt build a project with vite version newer than 5.0.11 HOT 10
- unable to run the dev script command HOT 3
- @crxjs/vite-plugin will break the build if build.rollupOptions.inputs added HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chrome-extension-tools.